<!--
var RootName = "eurocity";
var Vote_Value = 0;

function $(objName){
	return document.getElementById(objName);
}

function changeV(values){
	document.getElementById('votevalue').value = values;
}

function ShowList(ObjName,ImgObj,CloseV,OpenV){
	var DivObj = document.getElementById(ObjName);
	var DivObjEX = document.getElementById(ImgObj);
	if (DivObj){
		if (DivObj.style.display=='none'){
			SetCookie(ObjName,1);
			DivObjEX.src=OpenV;
			DivObj.style.display='';
		}else{
			SetCookie(ObjName,0);
			DivObjEX.src=CloseV;
			DivObj.style.display='none';
		}
	}
}
function ShowView(ObjName,ImgObjName,CloseV,OpenV){
	if(GetCookie(ObjName)==1){
		document.getElementById(ObjName).style.display='';
		document.getElementById(ImgObjName).src=CloseV;
	}else{
		document.getElementById(ObjName).style.display='none';
		document.getElementById(ImgObjName).src=OpenV;
	}
}

function ShowTabs(ObjA,ObjB,OACNA,OACNB,STn,STz){
	for(var STi=0; STi<=STz; STi++){
		if(STi==STn){
			ObjA[STn].className = OACNA;
			ObjB[STi].style.display = "block";
		}else{
			ObjA[STi].className = OACNB;
			ObjB[STi].style.display = "none";
		}
	}
}

function Content(size){
	document.getElementById('Content').style.fontSize=size+'px'
}
function openwin(url,winName,width,height,scrolls){
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 )){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	theproperty="width="+width+",height="+height+",fullscreen=0,location=0,menubar=0,directories=0,resizable=1,scrollbars="+scrolls+",status=0,titlebar=0,toolbar=0,hotkeys=0,screenx="+xposition+",screeny="+yposition+",left="+xposition+",top="+yposition;
	window.open(url,winName,theproperty);
}
//不带框的flash
function ShowFlash(strMediaURL,obj_width,obj_height) {
	var sTag = ''
	+ '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + obj_width + '" height="' + obj_height + '">'
	+ '<param name="movie" value="' + strMediaURL + '">'
	+ '<param name="quality" value="best">'
	+ '<param name="WMode" value="Transparent">'
	+ '<embed src="' + strMediaURL + '" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + obj_width + '" height="' + obj_height + '"></embed>'
	+ '</object>'
	+ '';
	document.write (sTag);
}
//显示栏目
function showsubmenu(sid){
	whichEl = eval("submenu" + sid);
	if (whichEl.style.display == "none"){
		eval("submenu" + sid + ".style.display=\"\";");
	}
	else{
		eval("submenu" + sid + ".style.display=\"none\";");
	}
}
//改变行背景颜色
function exchange(obj,txts,act){
	var TxtObj = document.getElementById(txts);
	var ExaObj = document.getElementById('exa');
	var ExbObj = document.getElementById('exb');
	if(obj.checked==true) TxtObj.style.backgroundColor = '#FFFFD8';
	else TxtObj.style.backgroundColor = '';
	if (ExaObj){
		if(ExaObj.value=='') ExaObj.value=act;
		else{
			if(ExaObj.value==act) ExaObj.value='';
			else ExbObj.value=act;
		}
	}
}
//选择全部
function selectall(objname,act){
	if(objname==null) alert("对不起，当前没有记录可选择！");
	else if(objname.length==null) objname.checked=act;
	else{
		var n=objname.length;
		var bgc = '#FFFFD8';
		if(act!=true) bgc = '';
		for (i=0;i<n;i++){
			objname[i].checked=act;
			document.all['txt'+objname[i].value].style.backgroundColor = bgc;
		}
	}
}
//批量赋值
function bq(objname,txt){
	if(objname==null) alert("对不起，当前没有记录可赋值！");
	else if(objname.length==null) objname.value=txt;
	else{
		var n=objname.length;
		for (i=0;i<n;i++) objname[i].value=txt;
	}
}
//改变多文件本框高度
function sizeChangeh(obj,size){
	var height = parseInt(obj.style.height);
	if (height+size>=50){
		obj.style.height=height+size;
	}
}
//改变多文件本框宽度
function sizeChangew(obj,size){
	var width = parseInt(obj.style.width);
	if (width+size>=50){
		obj.style.width=width+size;
	}
}


function left(mainStr,lngLen) {
	return (lngLen>0) ? mainStr.substring(0,lngLen) : null;
}
function right(mainStr,lngLen) {
	return (mainStr.length-lngLen>=0 && mainStr.length>=0 && mainStr.length-lngLen<=mainStr.length) ? mainStr.substring(mainStr.length-lngLen,mainStr.length) : null;
}
function mid(mainStr,starnum,endnum){
	return (mainStr.length>=0)?mainStr.substr(starnum,endnum):null;
}

//用js获取地址参数
function getUrl(name){
	var paramStr=location.search;
	if(paramStr.length==0)return null;
	if(paramStr.charAt(0)!='?')return null;
	paramStr=unescape(paramStr);
	paramStr=paramStr.substring(1);
	if(paramStr.length==0)return null;
	var params=paramStr.split('&');
	for(var i=0;i<params.length;i++){
		var parts=params[i].split('=',2);
		if(parts[0]==name){
			if(parts.length<2||typeof(parts[1])=="undefined"||parts[1]=="undefined"||parts[1]=="null")return "";
			return parts[1];
		}
	}
return null;
}
function PriceAuto(PAObj,PAValue,PAOldValue){
	PAObj.value = PAValue * PAOldValue;
}

function dateSelector(){
	var myDate=new Date();
	var dSy = myDate.getYear();
	var dSm = myDate.getMonth()+1;
	var dSd = myDate.getDate();
	var dSh = myDate.getHours();
	var dSn = myDate.getMinutes();
	var dSs = myDate.getSeconds()+1;
	return dSy + '年' +  dSm + '月' + dSd + '日　' + dSh + ':' + dSn + ':' + dSs;
}

//变小写为大写
function Amount(QuondamObj,AmountObj,Mode){
	if (isNaN(QuondamObj.value)){
		alert('请输入数字！');
		var str = QuondamObj.value;
		var lenStr = str.length;
		var L_str;
		var save_str = "x";
		for(i=lenStr;i>0;--i){
			L_str = str.substr(i-1,1)
			if (!isNaN(L_str))
			save_str =L_str + save_str;
		}
		QuondamObj.value = save_str.substr(0,(save_str.length)-1) ;
	}
	///////变小写为大写///////////////////////////////
	var untilArray = "分,角,元,拾,佰,仟,万,拾万,佰万,仟万,亿,拾亿,佰亿,仟亿,万亿" ;
	var untilArrays = untilArray.split(',') ;
	var untilNumber = "零,壹,贰,叁,肆,伍,陆,柒,捌,玖" ;
	var untilNumbers = untilNumber.split(',') ;
	var moneyLittle = QuondamObj.value ;
	var moneyLittles = moneyLittle.split('.') ;
	var headNumber,trailNumber,headNumbers,trailNumbers,i ;
	var l_Number,numberStr,placeStr ;
	if (moneyLittles.length == 2){ //存在小数点的情况
		headNumber = moneyLittles[0] ;
		headNumbers = headNumber.length ;
		trailNumber = moneyLittles[1] ;
		trailNumbers = trailNumber.length ;
		numberStr = "" ;
		for (i=headNumbers;i>0;i--){ //小数点以前的转换
			l_Number = parseInt(headNumber.substr(i-1,1)) ;
			placeStr = untilArrays[headNumbers+2-i] ;
			if (headNumbers-i >12) placeStr = "" ;
			numberStr = untilNumbers[l_Number] + placeStr + numberStr ;
		}
		for (i=0;i<trailNumbers;i++){ //小数点以后的转化
			if (i >= 2) break ;
			l_Number = parseInt(trailNumber.substr(i,1)) ;
			placeStr = untilArrays[1-i] ;
			numberStr = numberStr  + untilNumbers[l_Number] + placeStr ;
		}
	}
	else{ //不存在小数点的情况
		headNumber = moneyLittles[0] ;
		headNumbers = headNumber.length ;
		numberStr = "" ;
		for (i=headNumbers;i>0;i--){
			l_Number = parseInt(headNumber.substr(i-1,1)) ;
			placeStr = untilArrays[headNumbers+2-i] ;
			if (headNumbers-i >12) placeStr = "" ;
			numberStr = untilNumbers[l_Number] + placeStr + numberStr ;
		}
		numberStr  = numberStr + "零角零分" ;
	}
	switch (Mode){
	case "input" :
		AmountObj.value  = numberStr ;
		break;
	case "div" :
		AmountObj.innerHTML  = numberStr ;
		break;
	}
}

//
function high(which2){
	theobject=which2
	highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
	clearInterval(highlighting)
	which2.filters.alpha.opacity=70
}

function highlightit(cur2){
	if (cur2.filters.alpha.opacity < 100)
		cur2.filters.alpha.opacity += 8
	else if (window.highlighting)
		clearInterval(highlighting)
}
function changeamount(index){
	var mytr = document.getElementById("txt"+index);
	var mycheckbox = document.getElementById(index);
	var mytext = document.getElementById("text"+index);
	if(mycheckbox.checked == true){
		mytext.disabled = false;
		if(mytext.value == "0" || mytext.value == ""){
			mytext.value = "1";
		}
		mytr.style.backgroundColor = '#EEEEEE';
	}
	else{
		mytr.style.backgroundColor = '';
	}

	if(mycheckbox.checked == false){
		mytext.disabled = true;
	}
}

/*以下是Cookie操作*/
function GetCookie (name) {
	var arg = RootName + name + "=";
	var alen = arg.length;
	var clen = window.document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (window.document.cookie.substring(i, j) == arg)	return getCookieVal (j);
		i = window.document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}
function getCookieVal (offset) {
	var endstr = window.document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = window.document.cookie.length;
	return unescape(window.document.cookie.substring(offset, endstr));
}
function SetCookie (name, value) {
	var exp = new Date();
	exp.setTime(exp.getTime() + (30*24*60*60*1000));
	window.document.cookie = RootName + name + "=" + escape (value) + "; expires=" + exp.toGMTString()+";path=/";
}
function DeleteCookie (name) {
	var exp = new Date();
	exp.setTime (exp.getTime() - 1);
	var cval = GetCookie (RootName + name);
	window.document.cookie = RootName + name + "=" + cval + "; expires=" + exp.toGMTString()+";path=/";
}

/*以下是验证操作*/
//是否为空
function IsNull(text){
	if (text == "") return false;
	return true;
}
//校验是否全由数字组成
function IsNumber(text){
	var patrn = /^[0-9]{1,20}$/;
	if (!patrn.exec(text)) return false;
	return true;
}
//校验EMail正确
function IsMail(text){
	var patrn = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
	if (!patrn.exec(text)) return false;
	return true;
}

//菜单
function MM_reloadPage(init){
	if (init==true) with (navigator){
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)){
			document.MM_pgW=innerWidth;
			document.MM_pgH=innerHeight;
			onresize=MM_reloadPage;
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function MM_findObj(n, d){
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length){
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function Menu_show(){
	var i,p,v,obj,args=Menu_show.arguments;
	for (i=0; i<(args.length-2); i+=3)
		if((obj=MM_findObj(args[i]))!=null){
			v=args[i+2];
			if (obj.style){
				obj=obj.style;
				v=(v=='show')?'visible':(v=='hide')?'hidden':v;
			}
			obj.visibility=v;
		}
}

function chgimg(obj,nIndex){
	if(nIndex != o){
		obj.className="dpzsSelected";
		var z = "t" + o;
		document.getElementById(z).className="dpzsUnselected";
		o = nIndex;
		if(nIndex == 1){
			document.getElementById("img1").src="http://222.73.29.85/img/000001.png";
			document.getElementById("imga1").href="http://quote3.eastmoney.com/quote1_1.html";
		}
		if(nIndex == 2){
			document.getElementById("img1").src="http://222.73.29.85/img/399001.png";
			document.getElementById("imga1").href="http://quote3.eastmoney.com/quote1_5.html";
		}
		if(nIndex == 3){
			document.getElementById("img1").src="http://222.73.29.85/img/000003.png";
			document.getElementById("imga1").href="http://quote3.eastmoney.com/quote1_4.html";
		}
		if(nIndex == 4){
			document.getElementById("img1").src="http://222.73.29.85/img/399003.png";
			document.getElementById("imga1").href="http://quote3.eastmoney.com/quote1_8.html";
		}
	}
}
//-->

