

function do_vote(){
	var oOption = document.getElementsByName('choice');
	var oVote_id = $('vote_id');
	if(oOption == null || oVote_id == null) {
		xajax_doVote('','');
		return false;
	}	
	var aOption = new Array();
	for(var i=0;i < oOption.length;i ++) {
		if(oOption[i].checked == true)
			aOption.push(oOption[i].value);
	}
	xajax_doVote(aOption,oVote_id.value);
}

function view_result(){
	var vid = $('vote_id').value;
	window.open( 'Vote_Result.php?id='+vid,null, 'height=400,width=600,status=no,toolbar=no,menubar=no,location=no ');
}
function focus_element(sElementId){ 
	$(sElementId).focus();
}
/*****************ROCK EDIT*******************/
function left_login_check(){
	if($('strCustomerName').value == ""){
			alert(getErrorInfo("10002",'strCustomerName'));
			$('strCustomerName').focus();
			return false;
	}
	if($('strPassword').value == ""){
		alert(getErrorInfo("10002",'strPassword'));
		$('strPassword').focus();
		return false;
	}
	return true;
}
function checkForm_ProductComment()
{
	//check strInput validation
	if ($("strCustomerName_2") && $("strCustomerName_2").value == "") 
	{
		//set value of error message
		strMessage = "请输入用户名!";
		//show error message,mention user to input data
		alert(strMessage);
		//focus the column
		$("strCustomerName_2").focus();
		//return false and terminate submit
		return false;
	}
	//check strInput validation
	if ($("txtComment") && $("txtComment").value == "") 
	{
		//set value of error message
		strMessage = "请输入您的评论!";
		//show error message,mention user to input data
		alert(strMessage);
		//focus the column
		$("txtComment").focus();
		//return false and terminate submit
		return false;
	}
	$("InsertProductComment").submit();
}





function doSuggestionMessage(){
	xajax_insertSuggestionMessage(xajax.getFormValues('form_faq'));
	document.getElementById("form_faq").reset();

}

function submit_check()
{
		if (document.forms["frm"].user_name.value == "") {
			alert("请输入用户名!");
			document.forms["frm"].user_name.focus();
			return false;
		}
		if (document.forms["frm"].user_password.value == "") {
			alert("请输入密码!");
			document.forms["frm"].user_password.focus();
			return false;
		}
		if (document.forms["frm"].temp_lang[1].checked==true)
		{
			
			document.forms["frm_email"].LoginName.value =document.forms["frm"].user_name.value;
			document.forms["frm_email"].passwd.value = document.forms["frm"].user_password.value;

			document.forms["frm_email"].UserName.value = document.forms["frm"].user_name.value;
			document.forms["frm_email"].Template.value = "";
			document.forms["frm_email"].Temp_lang.value = "en";
			document.forms["frm_email"].action="http://corp.webmail.21cn.com/webmail/login.perform";
			document.forms["frm_email"].submit();
		}
		else
		{
			document.forms["frm_email"].LoginName.value =document.forms["frm"].user_name.value;
			document.forms["frm_email"].passwd.value = document.forms["frm"].user_password.value;
			document.forms["frm_email"].Temp_lang.value = "CN";//����
			document.forms["frm_email"].UserName.value = document.forms["frm"].user_name.value;
			document.forms["frm_email"].Template.value = "";
			document.forms["frm_email"].action="http://corp.webmail.21cn.com/webmail/login.perform";
			document.forms["frm_email"].submit();
		}
		return false;
}


function jschangepage(strPageName,id)
{
	var page=0;
	page = document.getElementById('otherPageinfo').value;
	document.getElementById('changepage').action=strPageName+".php?id="+id+"&page="+page;
	document.getElementById('changepage').submit();
}

function changeShowProduct(id){
	for(var intI = 1;intI <=3 ; intI ++){
		$('IndexProductTitle'+intI).className = "product_title";
		$('index_more'+intI).style.display = "none";
	}
	$('IndexProductTitle'+id).className = "product_title2";
	$('index_more'+id).style.display = "";
	
	for(var intJ = 1;intJ <=3 ; intJ ++){
		$('IndexProduct'+intJ).style.display = "none";
	}
	$('IndexProduct'+id).style.display = "";
	
}