var documentLoaded = false;

if (document.all) {
	window.attachEvent('onload',init)
}
else {
	window.addEventListener('load',init,false);
}

function init() {
	documentLoaded = true;
	/*
	var objFla = document.getElementsByTagName("object");
	for (var i=0; i<objFla.length; i++)
	{
		var objPara = objFla[i].getElementsByName("movie");
		if (objPara[0].value.indexOf("fla_menu") != -1)
			objFla[i].SetVariable("isActiviated2", "true");
	}
	objFla = document.getElementsByTagName("embed");
	for (var i=0; i<objFla.length; i++)
	{
		if (objFla[i].src.indexOf("fla_menu") != -1)
			objFla[i].SetVariable("isActiviated2", "true");
	}
	*/
	if (document.getElementById("div_fla_menu"))
		document.getElementById("div_fla_menu").style.visibility = "visible";
	if (document.getElementById("div_fla_list"))
		document.getElementById("div_fla_list").style.visibility = "visible";
	//document.fla_menu.SetVariable("isActiviated2", "true");
};

function WriteFlash(SWFfile, width, height)
{

	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
    document.write('<param name="movie" value="'+SWFfile+'">');
    document.write('<param name="quality" value="high">');
    document.write('<param name="WMode" value="transparent">');
    document.write('<embed src="'+SWFfile+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
    document.write('</object>');
    
}

function resizeDiv(objId, width, height)
{
	//alert('');
	if (documentLoaded)
	{
		var obj = document.getElementById(objId);
		if (obj)
		{
			obj.style.width = width+"px";
			obj.style.height = height+"px";
		}
	}
}

function webTrafficCount(pageID)
{
      
    var xmlDoc;
    
    xmlDoc=null;
    
    if (window.ActiveXObject)
    {
        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
        xmlDoc.async = "false";
        xmlDoc.load("../../shared/asp/savePlayerInfo.asp?pageID=" + pageID);        
    }	
    else if (window.XMLHttpRequest)
    {
        xmlDoc = new XMLHttpRequest();
        xmlDoc.open("GET", "../../shared/asp/savePlayerInfo.asp?pageID=" + pageID, true);
        xmlDoc.send("");      
        
    }
	
}
