/* nieyong wrote to insert the question into cookie*/
/*get html tag*/
function v( id ){
	return document.getElementById( id );
}

function vi( id ){
	return v( id ).innerHTML.replace(/(^\s*)|(\s*$)/g,"");
}

function vv( id ){
	return v( id ).value.replace(/(^\s*)|(\s*$)/g,"");
}
/*cookie handle*/
//设置cookies值
function setcookie(name,value){
	document.cookie=name+"="+value+";path=/";
}
function setcookie2( name, value ){
	document.cookie = name + "=" + escape( value ) + ";path=/";
}
//取得cookies值
function getcookie( name ){
	　var strArg=name+"=";
	　var nArgLen=strArg.length;
	  //获取cookie的长度
	　var nCookieLen=document.cookie.length;
	　var nEnd;
	　var i=0;
	　var j;
	while (i<nCookieLen){
		　j=i+nArgLen;
		　if (document.cookie.substring(i,j)==strArg){
			　nEnd=document.cookie.indexOf (";",j);
			　if (nEnd==-1) nEnd=document.cookie.length;
				 return document.cookie.substring(j,nEnd);
		  }
	　i=document.cookie.indexOf(" ",i)+1;
	　if (i==0) break;
	}
	　return '';
}



