﻿// JavaScript Document
function InsertFlash(Flash,Width,Height,ID){
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
	document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
	document.write("width=\"" + Width + "\" height=\"" + Height + "\" id=\"" + ID + "\">");
	document.write("<param name=\"movie\" value=\"" + Flash + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<embed src=\"" + Flash + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ");
	document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>");
	document.write("</object>");
}

function openNewWin(winUrl,winName,winWidth,winHeight){
window.open(winUrl,winName,"width="+winWidth+",height="+winHeight+",scrollbars=yes,toolbar=no, status=no, menubar=no, resizable=no")	
	}
	
function focusFlash(JsPics,JsLinks,JsTexts,w,h,texth){
var pics=JsPics;
var links=JsLinks;
var texts=JsTexts;
var focus_width=w;
var focus_height=h;
var text_height=texth;
var swf_height = focus_height+text_height;

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"> <param name="quality" value="high"><param name="bgcolor" value="#CCCCCC">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>'); 
}

function initMarquee() {
 var str=marqueeContent[0];
 document.write('<div id=marqueeBox style="overflow:hidden;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div>');
 marqueeId++;
 marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
 }
function startMarquee() {
 var str=marqueeContent[marqueeId];
  marqueeId++;
 if(marqueeId>=marqueeContent.length) marqueeId=0;
 if(document.getElementById("marqueeBox").childNodes.length==1) {
  var nextLine=document.createElement('DIV');
  nextLine.innerHTML=str;
  document.getElementById("marqueeBox").appendChild(nextLine);
  }
 else {
  document.getElementById("marqueeBox").childNodes[0].innerHTML=str;
  document.getElementById("marqueeBox").appendChild(document.getElementById("marqueeBox").childNodes[0]);
  document.getElementById("marqueeBox").scrollTop=0;
  }
 clearInterval(marqueeInterval[1]);
 marqueeInterval[1]=setInterval("scrollMarquee()",10);
 }
function scrollMarquee() {
 document.getElementById("marqueeBox").scrollTop++;
 if(document.getElementById("marqueeBox").scrollTop%marqueeHeight==(marqueeHeight-1)){
  clearInterval(marqueeInterval[1]);
  }
 }

function bcastr(width,height){
document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=scriptmain name=scriptmain codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/");
document.writeln("flash\/swflash.cab#version=6,0,29,0\" width=\""+width+"\" height=\""+height+"\">");
document.writeln("    <param name=\"movie\" value=\"bcastr.swf?bcastr_xml_url=xml\/bcastr.xml\">");
document.writeln("    <param name=\"quality\" value=\"high\">");
document.writeln("    <param name=scale value=noscale>");
document.writeln("    <param name=\"LOOP\" value=\"false\">");
document.writeln("    <param name=\"menu\" value=\"false\">");
document.writeln("    <param name=\"wmode\" value=\"transparent\">");
document.writeln("    <embed src=\"bcastr.swf?bcastr_xml_url=xml\/bcastr.xml\" width=\""+width+"\" height=\""+height+"\" loop=\"false\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" type=\"application\/x-shockwave-flash\" salign=\"T\" name=\"scriptmain\" menu=\"false\" wmode=\"transparent\"><\/embed>");
document.writeln("  <\/object>");
}
function fnToggle() {
	var next = NowFrame + 1;
	if(next == MaxFrame+1) 
	{
	NowFrame = MaxFrame;
	next = 1;
	}
	if(bStart == 0)
	{
	bStart = 1;
			  
	setTimeout('fnToggle()', 1000);
	return;
	}
	else
	{
	oTransContainer.filters[0].Apply();
	document.images['oDIV'+next].style.display = "";
	document.images['oDIV'+NowFrame].style.display = "none"; 
	oTransContainer.filters[0].Play(duration=5);
	if(NowFrame == MaxFrame) 
	NowFrame = 1;
	else
	NowFrame++;
	} setTimeout('fnToggle()', 6000);
	}
	
function showsubmenu(sid){
if(document.getElementById("submenu" + sid)!=null){
	whichEl = eval("submenu" + sid);
	if (whichEl.style.display == "none")
	{
	eval("submenu" + sid + ".style.display=\"\";");
	}
	else
	{
	eval("submenu" + sid + ".style.display=\"none\";");
	}
}
}