
rnd.today=new Date(); 
rnd.seed=rnd.today.getTime(); 

function rnd() { 
	rnd.seed = (rnd.seed*9301+49297) % 233280; 
	return rnd.seed/(233280.0); 
}

function rand(number) {
	return Math.ceil(rnd()*number); 
}
// end central randomizer. --> 

function display_link(t){
	var str=eval("area_"+t);
	for(var i=0;i<str.length;i++){
		arr=str[i].split("||");
	    eval("link"+t).options[i+1]=new Option(arr[0],arr[1],false,false);
	}
}

function select_gadt(t){
	/*
	arr=new Array("001001001","001001002","001001003","001001004");
	for (k=0;k<arr.length ;k++ ){
		var qq=eval("t"+arr[k]);
		if (arr[k]==t){ 
			qq.className="gadt_link2";
		}else{
			qq.className="";
		}
	} */
 }
function mycc(t,str_id){ 
    for(var i=1;i<4;i++){
 	    e=eval("b"+i);
		if(i==t){
			e.className="orang_14_b"; 
		}else{		
			e.className="hui_14_b";		
		}
	}
	getData('2',str_id); //大类ID,小类ID
}

function mycc2(t,str_id){ 
    for(var i=1;i<3;i++){
 	    e=eval("c"+i);
		if(i==t){
			e.className="orang_14_b"; 
		}else{		
			e.className="hui_14_b";		
		}
	}
	getData('3',str_id); //大类ID,小类ID
}
function jtrim(str){
	while (str.charAt(0)==" ")
          {str=str.substr(1);}      
     while (str.charAt(str.length-1)==" ")
         {str=str.substr(0,str.length-1);}
     return(str);
}


function getdate(){
	var todayx=new Date();
	yearx=todayx.getYear();
	monthx=todayx.getMonth()+1;
	dayx=todayx.getDate();

	Hoursx=todayx.getHours();
	Minutesx=todayx.getMinutes();
	Secondsx=todayx.getSeconds();

	datex=Secondsx+""+yearx+""+monthx+""+dayx+""+Hoursx+""+Minutesx;
	return datex;
}

function getFileExtension(filePath) { //v1.0
  fileName = ((filePath.indexOf('/') > -1) ? filePath.substring(filePath.lastIndexOf('/')+1,filePath.length) : filePath.substring(filePath.lastIndexOf('\\')+1,filePath.length));
  new_fileName=fileName.substring(fileName.lastIndexOf('.')+1,fileName.length);
  return new_fileName.toLowerCase();
}

function ads_centerPopup(mypage, myname, argr) {
	if (argr==""){
		winprops=""
	}else{
		winprops = argr+'status=yes,resizable=no,toolbar=no' 
	}

	win = window.open(mypage, myname, winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
}