function createBookmarkLink(url, title) {
	try {
		if (window.sidebar) { // Mozilla Firefox Bookmark
			return window.sidebar.addPanel(title, url, "");
		} else if( window.external ) { // IE Favorite
			return window.external.AddFavorite( url, title); 
		} else if(window.opera && window.print) { // Opera Hotlist
			return true; 
		}
	} catch(err) {
		// do nothing
	}
	alert('Could not create a bookmark on your client.\n\nTo return to ' + title + ' you must manually create a bookmark to: \n' + url + '.');
}

function writeBookmarkLink(url, title) {
	try {
		if (window.sidebar) { // Mozilla Firefox Bookmark
			return document.write('<a href="javascript:createBookmarkLink(\'' + url + '\', \'' + title + '\')");">Create a Bookmark to <em>' + title + '</em></a>'); 
		} else if (window.external) { // IE Favorite
			return document.write('<a href="javascript:createBookmarkLink(\'' + url + '\', \'' + title + '\')");">Add <em>' + title + '</em> to your Favorites</a>'); 
		} else if (window.opera && window.print) { // Opera Hotlist
			return document.write('<a rel="sidebar" href="' + url + '" title="' + title + '">Create a Bookmark to <em>' + title + '</em></a>');
		} 
	} catch(err) {
		// do nothing
	}
	return document.write('To return to ' + title + ' create a bookmark to: <a style="color: white;" href="' + url + '">' + url + '</a>');
}


var Comb50 = "";
function LoadGallery(pictureName,imageFile,titleCaption,captionText)
      {
	if (document.all)
  	{
	document.getElementById(pictureName).style.filter="blendTrans(duration=2)";
	document.getElementById(pictureName).filters.blendTrans.Apply();
 	}
	document.getElementById(pictureName).src = imageFile;
	if (document.all)
 	{
 	document.getElementById(pictureName).filters.blendTrans.Play();
	}
	document.getElementById(titleCaption).innerHTML=captionText;
      }




function showYouTube(url) {
try
{
var urlInput = url;
var pattern = "watch\?v=";
var replacement = "v/";
var urlInput = urlInput.replace(pattern, replacement);
var YouTubeEmbed = '<object width="445" height="364"><param name="movie" value="' + urlInput + '&rel=0&color1=0x3a3a3a&color2=0x999999&border=1&hl=en"><\/param><param name="wmode" value="transparent"><\/param>\<embed src="' + urlInput + '&rel=0&color1=0x3a3a3a&color2=0x999999&border=1&hl=en" type="application\/x-shockwave-flash" wmode="transparent" width="445" height="364"><\/embed><\/object>';	
return document.writeln(YouTubeEmbed);
}
catch(err)
  {
  txt="Hi .\n\n"
  txt+="There was an error on this page.\n\n"
  txt+="YouTube video cannot be displayed.\n\n"
  txt+="Error description: " + err.description + "\n\n"
  txt+="Error on: " + ctlValue + "\n\n"
  txt+="Click OK to continue.\n\n"
  alert(txt)
  }
finally
  {
  // do nothing
  }
} 

