
/* Navigator */
var color1="";
function navon(obj){
	color1=obj.style.background;
    obj.style.background="#00B1EA";
	if(obj.id=="nav2")document.getElementById("nav2sub").style.display="block";
	  else if(obj.id=="nav5")document.getElementById("nav5sub").style.display="block";
}
function navout(obj){
    obj.style.background=color1;
	if(obj.id=="nav3")obj.style.background="#7EA7BB";
	if(obj.id=="nav2"){obj.style.background="#00B1EA";document.getElementById("nav2sub").style.display="none";}
	  else if(obj.id=="nav5"){obj.style.background="#000000";document.getElementById("nav5sub").style.display="none";}
}

  function displaySubMenu(li) {
   var subMenu = li.getElementsByTagName("ul")[0];
   
   subMenu.style.display = "block";
  }
  function hideSubMenu(li) {
   var subMenu = li.getElementsByTagName("ul")[0];
   subMenu.style.display = "none";
  }

function navsubon(obj,num){
	 obj.style.background="#000000";
	// document.getElementById("money"+num).style.color="#ffffff";
}
function navsubout(obj,num){
	 obj.style.background="#00B1EA";
	// document.getElementById("money"+num).style.color="#000000";
}


function nav5subon(obj){
	obj.style.background="#BC0001";
}
function nav5subout(obj){
	obj.style.background="#000000";
}
/*Slider*/

function $s(id){
  return document.getElementById("menutitle2"+id);
}
function $sea(id){
  return document.getElementById(id);
}
function menu(num){
	if(num==1) {    document.getElementById("menutitle1").style.display="block";document.getElementById("menutitle2").style.display="none";document.getElementById("menutitle3").style.display="none";}
	else if(num==2){document.getElementById("menutitle1").style.display="none";document.getElementById("menutitle2").style.display="block";document.getElementById("menutitle3").style.display="none";}
	else if(num==3){document.getElementById("menutitle1").style.display="none";document.getElementById("menutitle2").style.display="none";document.getElementById("menutitle3").style.display="block";}
	  else {}

}

function menu2(num){
	if(num==1) {
		$s(1).style.display="block";$s(2).style.display="none";
		mot_or_service="service";fresh_date();//���service�˵�ʱ��ˢ�����ڿؼ���ʱ����ʾ����service��Ԥ�����ڡ�
	}
	else if(num==2){
		$s(1).style.display="none";$s(2).style.display="block";
		mot_or_service="mot";fresh_date();//���service�˵�ʱ��ˢ�����ڿؼ���ʱ����ʾ����mot��Ԥ�����ڡ�
	}
	document.getElementById("calendar_big").style.display="none";
}


var mot_or_book;
function calendar(id,id_){

	  document.getElementById(id).style.display=="block"?document.getElementById(id).style.display="none":document.getElementById(id).style.display="block";
   mot_or_book=id_;
}

function pop1(id){
document.getElementById("popinfor"+id).style.display="block";	
}

function pop0(id){
document.getElementById("popinfor"+id).style.display="none";	
}
function popaddress(){ document.getElementById("addresspop3").style.display='block';}

function hidden(id){
  document.getElementById(id).style.display="none";
}
/* select div model*/
var selectnum=new Array (25);
for(var i=1;i<25;i++)selectnum[i]=0;
function sendvalue(obj,name,num,id){
	document.getElementById(id+num).value=obj.innerHTML;
	document.getElementById(name).style.display="none";selectnum[num]=0;
	
}
function retrieveOption(str){
	
}
/*new select div*/
function showoption_new(id,num){ 
     if(document.getElementById(id+num).style.display=="block"){document.getElementById(id+num).style.display="none";}
        else {document.getElementById(id+num).style.display="block";}
}
function sendvalue_new(obj,des_id,num,id){
	//document.getElementById(des_id+num).innerHTML=obj.innerHTML;
	document.getElementById(id+num).style.display="none";selectnum[num]=0;
	document.getElementById(des_id+num).value=obj.innerHTML;
	document.getElementById("temp_value_"+num).innerHTML="";
	}
function sendvalue_new2(obj,des_id,num,id,str){
	//document.getElementById(des_id+num).innerHTML=obj.innerHTML;
	document.getElementById(id+num).style.display="none";selectnum[num]=0;
	document.getElementById(des_id+num).value=str;
	document.getElementById("temp_value_"+num).innerHTML="";
	}
/*new select div*/

function showoption(obj,num,obj2){
	if(document.getElementById(obj).style.display=="none"||document.getElementById(obj).style.display==""){document.getElementById(obj).style.display="block";}
	   else {document.getElementById(obj).style.display="none";}
	//if(selectnum[num]==0){document.getElementById(obj).style.display="block";selectnum[num]=1;}
	//   else {document.getElementById(obj).style.display="none";selectnum[num]=0;}
	  
}
function hiddenall(id,num1,num2){
	for(var i=num1;i<=num2;i++){document.getElementById(id+i).style.display="none";selectnum[i]=0;}
	}
/*home page selling pop up page*/
function closeopen(id1,id2){
	document.getElementById(id1).style.display="none";
	document.getElementById(id2).style.display="block";
	
}
function $reobj(id){ return document.getElementById(id);}
function showbearpage(num){ //charlie bear page
	if(num==1) { $reobj("bearpage_list").style.display="block"; $reobj("bearpage_upload").style.display="none";}
	 else if(num==2) { $reobj("bearpage_list").style.display="none"; $reobj("bearpage_upload").style.display="block";}
}
//***** Charlie Bear Page
function addlikenumber(id){
	var p=parseInt($reobj(id).value);
 	$reobj(id).value=parseInt($reobj(id).value)+1;
 	var a=parseInt($reobj(id).value);
 	if(a>p){return true ;}else{return false;}
 	
}
//******** CHarlie bear input assistant input
function onblur_enquiries(text,id,obj){
     if(obj.value==''){
	       obj.value=text; document.getElementById(id).value='';
		 }
            else {document.getElementById(id).value=obj.value;obj.value=''}
}
function onfocus_enquiries(text,id,obj){
	obj.value=document.getElementById(id).value;document.getElementById(id).value='';if(obj.value==text)obj.value='';
}

//select 模拟

function CoLeeSelect(thisObj){
 var thisinput = thisObj.getElementsByTagName("input");
 var thisul = thisObj.getElementsByTagName("ul");
 var thisli = thisul[0].getElementsByTagName("li");
 if(thisObj.id != "CoLeeSelect"){
  thisObj.id = "CoLeeSelect";
  thisObj.focus();
  thisul[0].style.display = "block";
  for(var i=0;i<thisli.length;i++){
   thisli[i].onmouseover = function(){
    for(var j=0;j<thisli.length;j++){
     thisli[j].className = "";
     }
    this.className = "on";
    }
   thisli[i].onclick = function(){
    thisinput[0].value = this.innerHTML;
    }
   }
  }else{
   ObjBlur();
  }
  thisObj.onblur = ObjBlur;
  function ObjBlur(){
   thisObj.id =  "";
   thisul[0].style.display = "none";
   thisObj.blur();
   }
}

 function CoLeeSelect3(thisObj){ // View Page - Compare Model 
 var thisinput = thisObj.getElementsByTagName("input");
 var thisul = thisObj.getElementsByTagName("ul");
 var thisli = thisul[0].getElementsByTagName("li");
 if(thisObj.id != "CoLeeSelect"){
  thisObj.id = "CoLeeSelect";
  thisObj.focus();
  thisul[0].style.display = "block";   //thisul[0].style.zIndex = "10000000000";
  for(var i=0;i<thisli.length;i++){  //thisli[i].style.zIndex = "10000000000";
   thisli[i].onmouseover = function(){
    for(var j=0;j<thisli.length;j++){
     thisli[j].style.background = "";
     thisli[j].style.color = "#666";
     }
    this.style.background = "#2E6BC6";
    this.style.color = "#fff";
    }
   thisli[i].onclick = function(){
	  thisinput[0].value = this.innerHTML; 
    /*if(this.innerText){alert(1);thisinput[0].value = this.innerText;}
	if(this.textContent){alert(2);thisinput[0].value = this.textContent;}
	if(this.innerHMTL){alert(3);thisinput[0].value = this.innerHMTL;}
	if( thisinput[0].value.charAt(thisinput[0].value.length-1) == " ") thisinput[0].value =  thisinput[0].value.substr(0,  thisinput[0].value.length-1);//ie7下会末尾多一个空格，此处把空格去除
*/
    }
   }
  }else{
   ObjBlur();
  }
  thisObj.onblur = ObjBlur;
  function ObjBlur(){
   thisObj.id =  "";
   thisul[0].style.display = "none";
   thisObj.blur();
   }
 }
 //javascript去空格函数    
 function LTrim(str){ //去掉字符串 的头空格   
 
     
 }  
 
 
 function $northern(id){
  return document.getElementById(id);	
}

function hide_e(id){
  $northern(id).style.display = 'none';	
}

function show_e(id){
  $northern(id).style.display = 'block';	
}
 
<!--
var winWidth = 0;
var winHeight = 0;
function findDimensions() //函数：获取尺寸
{
//获取窗口宽度
if (window.innerWidth)
winWidth = window.innerWidth;
else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;
//获取窗口高度
if (window.innerHeight)
winHeight = window.innerHeight;
else if ((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;
//通过深入Document内部对body进行检测，获取窗口大小
if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth)
{
winHeight = document.documentElement.clientHeight;
winWidth = document.documentElement.clientWidth;
}
//结果输出至两个文本框

}
//-->
function pop_up(w,h,id){
	WLeft_f2   =   Math.ceil((winWidth   -   w)   /   2  );
    WTop_f2   =   Math.ceil((winHeight   -   h)   /   2   ); 
	if(WTop_f2<0) WTop_f2=10;
	obj_f2 = document.getElementById(id);
    obj_f2.style.left = WLeft_f2 +"px";
	if(WTop_f2<=25){
          obj_f2.style.top ="25px";			
	}else{
		  obj_f2.style.top =WTop_f2 +"px";			
		}	

}

