//*************************************************************************************
function fnGoToPhoto(webSite,loadWhere,winHieght,winWidth) 
	{
	if (webSite=="")
		alert("Please select a website to launch");
	else 
		d = new Date();
		sWinTitle = d.getTime();
		//window.showModalDialog(webSite,sWinTitle,"dialogWidth:"+ winWidth +"px;dialogHeight:"+ winHieght +"px;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no;scroll:no");	
		window.showModelessDialog(webSite,sWinTitle,"dialogWidth:"+ winWidth +"px;dialogHeight:"+ winHieght +"px;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no;scroll:no");	
	}
//*************************************************************************************


//*************************************************************************************
function fnGoToPhotoBox(webSite,winHieght,winWidth) 
	{
	if (webSite=="")
		alert("Please select a website to launch");
	else 
		var strWindowTitle = webSite;
		strWindowTitle = strWindowTitle.replace(/(\W+)/g,"");
		var strWindowURL = "photo_box.html?photo=" + webSite;
		window.open(strWindowURL,strWindowTitle,"height=" + winHieght + ",width=" + winWidth + ",scrollbars=no,resizable=yes");	
	}
//*************************************************************************************


//*************************************************************************************
function fnGoToWeb(webSite,loadWhere,winHieght,winWidth) 
	{
	if (webSite=="")
		alert("Please select a website to launch");
	else 
		{
		if (loadWhere.toLowerCase()=="new")
			{
			d = new Date();
			sWinTitle = d.getTime();
			window.open(webSite,sWinTitle,"height=" + winHieght + ",width=" + winWidth + ",scrollbars=no,resizable=yes");		
			}
		else
			{
			if (loadWhere.toLowerCase()=="here")
				document.location.href=webSite;
			else
				document.getElementById('main').src=webSite;
			}
		}
	}
//*************************************************************************************

//*************************************************************************************
function fnBrowserBack(intPages) 
	{
	window.history.go(intPages);
	}
//*************************************************************************************

//*************************************************************************************
function closeWindow()
	{
	alert("closing window");
	window.close;
	}
//*************************************************************************************

//*************************************************************************************
function fnSwapLinkColor(srcID) 
	{
	var oSrcID = document.all.item(srcID);		        
	
	if (!oSrcID) return;
	
	if (oSrcID.color.toLowerCase()=="#0066ff")
		oSrcID.color = "#ff9900";
	else
		oSrcID.color = "#0066ff";	
	}
//*************************************************************************************

//*************************************************************************************
function fnHighlightObject(oSrcID,sPrimaryColor,sSecondaryColor) 
	{
	if (!oSrcID) return;

	if (oSrcID.style.backgroundColor.toLowerCase()==sSecondaryColor)
		{
		oSrcID.style.backgroundColor = sPrimaryColor;
		oSrcID.style.borderTopColor = sPrimaryColor;
		oSrcID.style.borderBottomColor = sPrimaryColor;
		}
	else
		{
		oSrcID.style.backgroundColor = sSecondaryColor;	
		oSrcID.style.borderTopColor = "black";
		oSrcID.style.borderBottomColor = "black";
		}
	}
//*************************************************************************************

//*************************************************************************************
function fnSizeWindow(iWinWidth,iWinHeight,iTop,iLeft) 
	{
	if (!iTop) iTop = 25
	if (!iLeft) iLeft = 50
	window.moveTo(iLeft,iTop);
	
	if (document.all) 
		{
		top.window.resizeTo(iWinWidth,iWinHeight);
		}
	
	else if (document.layers||document.getElementById) 
		{
		if (top.window.outerHeight<iWinHeight||top.window.outerWidth<iWinWidth) 
			{
			top.window.outerHeight = iWinHeight;
			top.window.outerWidth = iWinWidth;
			}
		}
	}
//*************************************************************************************

//*************************************************************************************
function fnFlipImage(imgurl) 
	{
	if (navigator.userAgent.toLowerCase().indexOf('msie') > -1) 
		var oSrc = window.event.srcElement;
	else 
		var oSrc = window.event.target;

	if (oSrc.tagName=="IMG") oSrc.src=imgurl;	
	}
//*************************************************************************************


