﻿// 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 scoll(){
	var speed=30
	demo2.innerHTML=demo1.innerHTML
	function Marquee(){
	if(demo2.offsetWidth-demo.scrollLeft<=0)
	demo.scrollLeft-=demo1.offsetWidth
	else{
	demo.scrollLeft++
	}
	}
	var MyMar=setInterval(Marquee,speed)
	demo.onmouseover=function() {clearInterval(MyMar)}
	demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
}

function showSubmenu(n){
var mtop;
var mleft;
var menuObj;
mtop = document.getElementById('c'+n).offsetTop;
mleft = document.getElementById('c'+n).offsetLeft;
menuObj = document.getElementById('m'+n);
for(i=1;i<=8;i++ ){
	document.getElementById('m'+i).style.display='none';
}
menuObj.style.display = '';
menuObj.className ='sshow';
menuObj.style.top = mtop+40+"px";
menuObj.style.left = mleft+300+"px";
}

function showCon(sid){
	whichEl = eval("submenu" + sid);
	if (whichEl.style.display == "none")
	{
	eval("submenu" + sid + ".style.display=\"\";");
	}
	else
	{
	eval("submenu" + sid + ".style.display=\"none\";");
	}
}

function openNewWin(winUrl,winName,winWidth,winHeight){
window.open(winUrl,winName,"width="+winWidth+",height="+winHeight+",scrollbars=yes,toolbar=no, status=no, menubar=no, resizable=yes")	
	}
	
function tabChange(ele,curr,num)
{
	for(var i=1;i<=num;i++ )
	{
		document.getElementById(ele+i).className = ele;
		document.getElementById(ele+"Con"+i).style.display = "none";
	}
		document.getElementById(ele+curr).className = ele+"on";
		document.getElementById(ele+"Con"+curr).style.display = "";
}
