﻿//window.onerror=new Function("return true");
function $(ID)
{
    if(document.getElementById&&document.getElementById(ID))
	{
		return document.getElementById(ID);
	}
	else if (document.all&&document.all(ID)) 
	{
		return document.all(ID);
	}
	else if (document.layers&&document.layers[ID])
	{
		return document.layers[ID];
	}
    else
    {
		return false;
	}
}
function Display(ID){
	if ($(ID).style.display == "none"){
		$(ID).style.display="";
	}else{
	    $(ID).style.display="none";
	}
}
function ToTop()
{
	for (var i=$("toTop").offsetTop; i>1; i-=Math.ceil(i/6))
	{
		window.scrollTo(0,i);
	}
	window.scroll(0,0);return false;
}
function Print(Str)
{
	return document.write(Str);
}
function Flash(Path,Width,Height)
{
	var Tmp
	Tmp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'">'
	Tmp+='<param name="movie" value="'+Path+'"/>'
	Tmp+='<param name="quality" value="High"/>'
	Tmp+='<param name="scale" value="ExactFit"/>'
	Tmp+=' <param name="wmode" value="transparent"/>';
	Tmp+='<embed wmode="transparent" src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" scale="ExactFit"/>'
	Tmp+='</object>'
	Print(Tmp);
}
function DefaultWidth(obj,Intwidth)
{
	if(obj.width>Intwidth)
		obj.width=Intwidth;
}
function DefaultHeight(obj,Intheight)
{
	if(obj.height>Intheight)
		obj.height=Intheight;
}