function setCookie(name, value) {
        
document.cookie = name + "=" + escape(value);
}


function getCookie(Name) {
   var search = Name + "=";
   if(document.cookie.length > 0) {
      var offset = document.cookie.indexOf(search);
      if(offset != -1) {
         offset += search.length;
         var end = document.cookie.indexOf(";", offset);
         if(end == -1) end = document.cookie.length;
         return unescape(document.cookie.substring(offset, end));
      }
      else return "";
   }
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;

}//xmlhttp
Request = {
 QueryString : function(item){
  var sValue = location.search.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)","i"));
  return sValue ? sValue[1] : sValue;
 }
}
<!--

	function sp(plans,lanmu,lancd,phone,users,quest,stock,stock1,stock2,stock3,urlsw)
	{

		 local=window.location.href;
	     prewp=document.referrer;
         xmlHttp=GetXmlHttpObject()
		 handphone=phone
		 stock=stock
		 if (xmlHttp==null)
       
		 ymPrompt.alert({title:'提示',message:'您的浏览器不支持AJAX！'})
         if(/^13\d{9}$/g.test(phone)||(/^15[8,9]\d{8}$/g.test(phone)))
        {
			

url3=window.location.hostname

if((url3=="151v.com")||(url3=="www.151v.com"))
	{
		 var url="/save/savephone_new.asp";
         url=url+"?plans="+plans;
         url=url+"&lanmu="+lanmu;
         url=url+"&lancd="+lancd; 
		 url=url+"&phone="+phone;
		 url=url+"&users="+users;
     	 url=url+"&action=add";
         url=url+"&local="+local;
         url=url+"&prewp="+prewp;
         url=url+"&quest="+quest;
		 url=url+"&stock="+stock;
		 url=url+"&stock1="+stock1;
		 url=url+"&stock2="+stock2;
		 url=url+"&stock3="+stock3;
         xmlHttp.open("GET",url,true);
         xmlHttp.send(null);
		 
		
	}
else
	{
		
         
        var url="?plans="+plans;
         url=url+"&lanmu="+lanmu;
         url=url+"&lancd="+lancd; 
		 url=url+"&phone="+phone;
		 url=url+"&users="+users;
     	 url=url+"&action=add";
         url=url+"&local="+local;
         url=url+"&prewp="+prewp;
         url=url+"&quest="+quest;
		 url=url+"&stock="+stock;
		 url=url+"&stock1="+stock1;
		 url=url+"&stock2="+stock2;
		 url=url+"&stock3="+stock3;
		 
		
     
	
document.getElementById("save").innerHTML="<iframe  style='float:left' marginheight='0' marginwidth='0' frameborder='0' width='0' height='0' scrolling=no src=http://www.151v.com/save2.html"+url+"></iframe>"
	}
	

		
		  if(lancd == "reg"){
			form2.submit();
		 }
			else 
			{
		
		  ymPrompt.alert({title:'提示',message:'您的信息已提交成功！'})
		  	
		
			 }

		}
		else{
		
		 
		  ymPrompt.alert({title:'提示',message:'尊敬的客户您输入的号码有误,<br><br>请重新输入号码！'})
		}
         
	}
	

	
function handler(tp){
			if(tp=='ok'){
				stock=getCookie('stock')
				phone=getCookie('phone')
				window.open('http://www.151v.com/diagnose.html?stock='+stock+'&phone='+phone,'_blank')
			}

		}
		
			
function handler2(tp){
			if(tp=='ok'){
			
				urlsw=getCookie('urlsw')
			window.open(urlsw,'_blank')
			}

		}
		
