﻿// JScript File

function writeHomeFlash(strParam)
{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="414" height="281" id="videoPlayer" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="swf/videoPlayer.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="swf/videoPlayer.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="414" height="281" name="videoPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function writeHomeFlash2(strParam)
{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="414" height="281" id="videoPlayer" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="swf/videoPlayer_Resources.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="swf/videoPlayer_Resources.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="414" height="281" name="videoPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function writeAboutFlash(strParam)
{
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="414" height="281" id="videoPlayer" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="swf/videoPlayer_About.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="swf/videoPlayer_About.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="414" height="281" name="videoPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function activateDiv()
{
    getElement("adminmode").value="true";
}

function hideDiv()
{
	if (document.getElementById) 
	{
        getElement("colorwindow").style.visibility='hidden';
        getElement("colorwindow").style.display='none';
    }
    else if (document.all) 
    {
        getElement("colorwindow").style.display='none';
    }
    else
    {
        getElement("colorwindow").style.visibility='hidden';
    }
}

 function positionColor() 
 { 
    if (getElement("colorwindow")!=null)
    { 
        if (getElement("title")!=null)
        {
            getElement("colorwindow").style.left=findX(getElement("titlediv"))+"px"; 
            getElement("colorwindow").style.top=findY(getElement("titlediv"))+"px"; 
            getElement("colorwindow").style.width=getElement("contentdiv").offsetWidth+"px";
            getElement("colorwindow").style.height=getElement("contentdiv").offsetHeight+findY(getElement("contentdiv"))-findY(getElement("titlediv"))+"px";
        }
        else
        {
            getElement("colorwindow").style.left=findX(getElement("titlediv"))+"px"; 
            getElement("colorwindow").style.top=findY(getElement("titlediv"))+"px"; 
            getElement("colorwindow").style.width=getElement("contentdiv").offsetWidth+"px";
            getElement("colorwindow").style.height=getElement("contentdiv").offsetHeight+findY(getElement("contentdiv"))-findY(getElement("titlediv"))+"px";
        }
        

    }
 }

function showColor()
{
        if (getElement("adminmode").value!="true")
        {
            return;
        }
        
        if (document.getElementById) 
	    {
            getElement("colorwindow").style.visibility='visible';
            getElement("colorwindow").style.display='block';
        }
        else if (document.all) 
        {
            getElement("colorwindow").style.display='block';
        }
        else
        {
            getElement("colorwindow").style.visibility='visible';
        }
}

function findX(objElement) {

	var lngLeft = 0;
	var isFirefox = ( navigator.userAgent.indexOf( "Firefox/" ) != -1 );

    if (objElement.offsetParent) {
		while (objElement.offsetParent) {
			lngLeft += objElement.offsetLeft;
			objElement = objElement.offsetParent;
		}
	} else if (objElement.x) {
		lngLeft += objElement.x;
	}
	return lngLeft;
}

function findY(objElement) {
	var lngTop = 0;
	var isFirefox = ( navigator.userAgent.indexOf( "Firefox/" ) != -1 );
	
 if (objElement.offsetParent) {
		while (objElement.offsetParent) {
			lngTop += objElement.offsetTop;
			objElement = objElement.offsetParent;
		}
	} else if (objElement.y) {
		lngTop += objElement.y;
	}
	return lngTop;
}
 

function getElement(strElement) {
	// XML-based browsers (IE 4+/Netscape 6+/Mozilla/Gecko)
	if (document.getElementById(strElement)) {
		return document.getElementById(strElement);
	// IE
	} else if (document.all) {
		return document.all[strElement];
	// Netscape
	} else if (document.layers) {
		return document[strElement];
	}
} 

function toggleQuote(showQuote, hideQuote, hideQuote2) {
	if (document.getElementById) {
		// nice browsers
		var style1 = document.getElementById(showQuote).style;
		var style2 = document.getElementById(hideQuote).style;
		var style3 = document.getElementById(hideQuote2).style;
		style1.display = style1.display? "block":"block";
		style2.display = style2.display? "none":"none";
		style3.display = style3.display? "none":"none";
	}
	else if (document.all) {
		// ie
		var style1 = document.all[showQuote].style;
		var style2 = document.all[hideQuote].style;
		var style3 = document.all[hideQuote2].style;
		style1.display = style1.display? "block":"block";
		style2.display = style2.display? "none":"none";
		style3.display = style3.display? "none":"none";
	}
	else if (document.layers) {
		// good ol netscape4
		var style1 = document.layers[showQuote].style;
		var style2 = document.layers[hideQuote].style;
		var style3 = document.layers[hideQuote2].style;
		style1.display = style1.display? "block":"block";
		style2.display = style2.display? "none":"none";
		style3.display = style3.display? "none":"none";
	}
}
