document.write("<script src='js/validator.js' type='text/javascript' language='javascript'></script>");

function getto(){
 window.open('/adminc');	
}

// 加载后执行的代码
function regetImage(obj) {
    var today = new Date();
	var today_ms = ""
		+ today.getFullYear() + (today.getMonth() + 1) + today.getDate()
		+ today.getMinutes() + today.getSeconds() + today.getMilliseconds();
    obj.src = '../include/auth/getimage.php?' + today_ms;
}



function bookmarkit()
 {window.external.addFavorite(location.href,document.title);}


function setHomepage(pageURL) {
    if (document.all) {
        document.body.style.behavior='url(#default#homepage)';
        document.body.setHomePage(pageURL);
    }
    else if (window.sidebar) {
        if(window.netscape) {
            try {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            }
            catch (e) {
                alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项signed.applets.codebase_principal_support 值该为true" );
            }
        }
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
        prefs.setCharPref('browser.startup.homepage',pageURL);
    }
}




function cswitch(tid,box,num,tag){
if(tid==null || box==null || num==null) return;
var tabs=document.getElementById(tid);
if(tabs==null) return;
if(tag=="") tag="LI";
tabs=tabs.getElementsByTagName(tag);
for(n=0;n<tabs.length;n++){
	 if(num==n){
		tabs[n].id="current";
		document.getElementById(box+n).className="sw";
	 }else{
		tabs[n].id="";
		document.getElementById(box+n).className="hd";
	 }	
}	
}

var flag=false; 

function DrawImage(ImgD,awidth,aheight){ 

var image=new Image(); 

image.src=ImgD.src; 

if(image.width>0 && image.height>0){ 

  flag=true; 

  if(image.width/image.height>= awidth/aheight){ 

   if(image.width>awidth){

    ImgD.width=awidth; 

    ImgD.height=(image.height*aheight)/image.width; 

   }else{ 

    ImgD.width=image.width;

    ImgD.height=image.height; 

   }

   /*ImgD.alt="bigpic"  */

  } 

  else{ 

   if(image.height>aheight){

    ImgD.height=aheight; 

    ImgD.width=(image.width*awidth)/image.height; 

   }else{ 

    ImgD.width=image.width;

    ImgD.height=image.height; 

   } 

    /*ImgD.alt="bigpic"  */ 

  } 

}

}

function fgoto(){
}

document.write("<script src='js/animate.js' type='text/javascript' language='javascript'></script>");


function locahref(){
	 username = document.getElementById("pusername").value;
	 window.open("check.php?username="+username);
}


function killErr(){
	return true;
}
window.onerror=killErr;

