function openWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function defaul_home(){
	this.home.style.behavior='url(#default#homepage)';this.home.setHomePage('http://www.casic-amc.com');
}

function bookmarkit(){
	window.external.addFavorite('http://www.casic-amc.com','北京航天测控技术开发公司');
	}

function checkfrm_userlogin(){
	temp=document.form_userlogin.name;
	if (temp.value==""){
		alert("请输入用户名！");	
		temp.focus();
		return false;
	}else{
		tmp=temp.value;
		while(tmp.charAt(0)==" ")
			tmp=tmp.substring(1);
		if (tmp==""){
			alert("请输入用户名！");
			temp.focus();
			return false;
		}
	}
	temp=document.form_userlogin.password;
	if (temp.value==""){
		alert("请输入密码！");	
		temp.focus();
		return false;
	}else{
		tmp=temp.value;
		while(tmp.charAt(0)==" ")
			tmp=tmp.substring(1);
		if (tmp==""){
			alert("请输入密码！");
			temp.focus();
			return false;
		}
	}
return true;
}

function checkfrm_loginform(){
	temp=document.loginform.user;
	if (temp.value==""){
		alert("请输入邮箱名");
		document.loginform.user.focus();
		return false;
	}else{
		if (temp.value=="用户ID"){
			alert("请输入邮箱名");
			document.loginform.user.focus();
			return false;
		}
	}
	temp=document.loginform.password;
	if (temp.value==""){
		alert("请输入密码");
		document.loginform.password.focus();
		return false;
	}else{
		if (temp.value=="*****"){
			alert("请输入密码");
			document.loginform.password.focus();
			return false;
		}
	}
return true;
}

function checkvalue(theName){
   if (theName.value){
	if (!theName.checked){
			alert("请选择纪录！"); 
		return false;
		}
   }else{
	len=theName.length;
	flag=false;
	for (i=0;i<len;i++)
	{
		if ( theName[i].checked)
			flag=true;
	}
	if (!flag){
		alert("请选择纪录！");
		return false;
	}
   } 
   return true;
}


function checkfrm_search(){
	temp=document.form_search.keystr;
	if (temp.value==""){
		alert("请输入关键词");
		document.form_search.keystr.focus();
		return false;
	}else{
		if (temp.value=="关键词"){
			alert("请输入关键词");
			document.form_search.keystr.value="";
			document.form_search.keystr.focus();
			return false;
		}
	}
return true;
}

function checkfrm_note(){
	temp = document.form_note.note_title;
	if (temp.value==""){
		alert("请录入标题！");	
		temp.focus();
		return false;
	}else{
		tmp=temp.value;
		while(tmp.charAt(0)==" ")
			tmp=tmp.substring(1);
		if (tmp==""){
			alert("请录入标题！");
			temp.focus();
			return false;
		}
	}
	temp = document.form_note.note_name;
	if (temp.value==""){
		alert("请输入您的姓名！");	
		temp.focus();
		return false;
	}else{
		tmp=temp.value;
		while(tmp.charAt(0)==" ")
			tmp=tmp.substring(1);
		if (tmp==""){
			alert("请输入您的姓名！");
			temp.focus();
			return false;
		}
	}
return true;
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function load()
  { if (page_shortcut.select2.selectedIndex > 0) location = page_shortcut.select2.options[page_shortcut.select2.selectedIndex].value;}