
function killErrors() {
return true;
}
window.onerror = killErrors;
function addfav()
{
	 window.external.AddFavorite('http://www.xamlxx.com','西安名流学校');
}
function sethome()
{
	this.homepage.style.behavior='url(#default#homepage)';this.homepage.sethomepage('http://www.xamlxx.com');
}
function init()
{
        var pics = document.getElementById("pictures").childNodes;
        var length = pics.length;
        ScrollPic.prototype.flag = 0;
        for(var i = 0 ; i < length ; i++)
        {
                if(pics[i].tagName == "TD")
                {
                        var td = document.createElement("TD");
                        td.innerHTML = pics[i].innerHTML;
                        document.getElementById("pictures").appendChild(td);
                }
        }
        document.getElementById("pictures").onmouseover = function ()
        {
                ScrollPic.prototype.flag = 1;
        }
        document.getElementById("pictures").onmouseout = function ()
        {
                if(ScrollPic.prototype.flag = 1)
                {
                        ScrollPic.prototype.flag = 0;
                        ScrollPic();
                }
        }
        ScrollPic();
}

function ScrollPic()
{
        var layer = document.getElementById('MarqueePictues').getElementsByTagName("DIV")[0];
        if(layer.scrollLeft++ == layer.scrollLeft)
        {
                layer.scrollLeft = layer.clientWidth/2 - 45;
        }
        if(ScrollPic.prototype.flag == 0)
        {
                setTimeout("ScrollPic()",50);
        }
}
function HeadFlash(Path,Width,Height,Transparent){
	 var Temp,T=""
	 Temp='<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+'">'
	 Temp+='<param name="movie" value="'+Path+'"/>'
	 Temp+='<param name="quality" value="High"/>'
	 Temp+='<param name="scale" value="ExactFit"/>'
	 if (Transparent) {Temp+=' <param name="wmode" value="transparent"/>';T='wmode="transparent"'}
	 Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit"/>'
	 Temp+='</object>'
	 document.getElementById("FlashHead").innerHTML=Temp
}
function ResizeImage(objImage,maxWidth) {
	try{
		if(maxWidth>0){
			if(objImage.width>maxWidth){
				objImage.width=maxWidth;
				objImage.attachEvent('onclick', function(){try{showModelessDialog(objImage.src);}catch(e){window.open(objImage.src);}});
				objImage.attachEvent('onmouseover', function(){objImage.style.cursor='pointer';});
			}
		}
	}catch(e){};
}