<!--
var mainTitle="黄山旅游电子商务网";
var errTitle="黄山旅游电子商务网温馨提示您：";

//隐藏错误
function killErrors() {
  return true; 
}
window.onerror = killErrors;

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function randomNumber(limit){
  return Math.floor(Math.random()*limit+1);
}

//显示 隐含 
function getDiv(divid){
	return document.getElementById(divid); 
}

function show(strtype){
getDiv(strtype).style.display = "block";
}

function hide(strtype){
getDiv(strtype).style.display = "none";
}
//显示 隐含 

//获取后台标题
function getMainTitle(){
	var titleText=new String(window.top.document.title);		
	window.top.document.title=titleText.replace("鼎游旅游电子商务网",mainTitle);	
}
window.load=getMainTitle();//替换标题




function openwin(url,wid,hei,reload)
{
  var str;
  if(url==null)
     {
      alert('您的URL不能为空!');
      return;
     }
  
  if(wid==null || wid=='')
     wid=450;
  if(hei==null || hei=='')
     hei=360;
 
  str=window.showModalDialog('/system/openwin.html',url,'dialogWidth:'+wid+'px;dialogHeight:'+hei+'px;status:no;scrollbars=no;help:0;center:1');
  if(str!='0' && reload==true)
     location.reload();   
  return str;           
}

function openwin1(url,wid,hei,reload)
{
  var str;
 // alert(url);
  if(url==null)
     {
      alert("您的URL不能为空!");
 
      return;
     }
  
  if(wid==null||wid=='')
     wid=470;
  if(hei==null||hei=='')
     hei=360;
 
  str=window.showModalDialog(url,window,'dialogWidth:'+wid+'px;dialogHeight:'+hei+'px;status:no;scrollbars=no;scroll=no;help:0;center:1');
  
  if(reload==true)
     window.location.reload();   

  return str;           
}

function bbimg(o){
 var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
 return false;
}
//轮滚变化大小 调用方法： <IMG   src="#"onmousewheel='return bbimg(this)'>

//图片自动缩小的js代码,用以防止图片撑破页面 调用方法： <img src="图片" border=0 width="180" height="110" onload="javascript:DrawImage(this);">width="180" height="110"  注意这里最好限定,如果不限定加载图时会成原大,然后再缩小,这个过程如果图大了很难看的.这里是宽度和高度,在前面的JS里改,这里也作相应的改.
var flag=false; 
function DrawImage(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
   if(image.width>420){
    ImgD.width=420; 
    ImgD.height=420*((image.height)/image.width); 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
}
}

function DrawImageWidth(ImgD,Wid){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
  flag=true; 
   if(image.width>Wid){
    ImgD.width=Wid; 
    ImgD.height=Wid*((image.height)/image.width); 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
}
}


//字体变化
function fontZoom(size)
{
 document.getElementById('fontzoom').style.fontSize=size+'px'
}

//Dreamweaver 显示 隐含 层

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//隐含 select start 肖一兵 添加 
function showDiv(sDivID, bState) {
	var oDiv = document.getElementById(sDivID);
	/*@cc_on
	@if (@_jscript_version >= 5) 
    try {
		var oIframe = document.getElementById('HelpFrame');
		oIframe.scrolling = 'no';
		oIframe.frameborder = 0;
		oIframe.style.top = 0;
        oIframe.style.left = 0;
		oIframe.style.left.width=180;
	}
	catch (e) {
		var oIframe = document.createElement('iframe');
		var oParent = oDiv.parentNode;
		oIframe.id = 'HelpFrame';
		oParent.appendChild(oIframe);
		oIframe.scrolling = 'no';
		oIframe.frameborder = 0;
		oIframe.style.top = 0;
        oIframe.style.left = 0;
		oIframe.style.left.width=170;
	}
    oIframe.frameborder = 0;
    oIframe.style.position = 'absolute';
	oIframe.scrolling = 'no';
    oIframe.style.top = 0;
    oIframe.style.left = 0;
    oIframe.style.display = 'none';
	oIframe.style.left.width=170;
	@end @*/
    if (bState) {
        oDiv.style.display = 'block';
        /*@cc_on
        @if (@_jscript_version >= 5)
        oIframe.style.top = oDiv.style.top;
        oIframe.style.left = oDiv.style.left;
        oIframe.style.zIndex = oDiv.style.zIndex - 1;
        oIframe.style.width = parseInt(oDiv.offsetWidth);
        oIframe.style.height = parseInt(oDiv.offsetHeight);
        oIframe.style.display = 'block';
        @end @*/
    }
    else {
        /*@cc_on
        @if (@_jscript_version >= 5)
        oIframe.style.display = 'none';
        @end @*/
        oDiv.style.display = 'none';
    }
}
//隐含 select end 肖一兵 添加 


//

function MM_swapImgRestore() { //v3.0
  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_preloadImages() { //v3.0
  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_swapImage() { //v3.0
  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];}
}

var r1 = new RegExp('[^A-Za-z0-9_]','');
var r2 = new RegExp('[^A-Za-z0-9]','');
var r3 = new RegExp('[^0-9]','');
var http = new RegExp('[^A-Za-z0-9_://.]','');



function isValidEmail(s)
{
		var reg1 = new RegExp('^[a-zA-Z0-9][a-zA-Z0-9@._-]{3,}[a-zA-Z]$');
		var reg2 = new RegExp('[@.]{2}');
		
		if (s.search(reg1) == -1
				|| s.indexOf('@') == -1
				|| s.lastIndexOf('.') < s.lastIndexOf('@')
				|| s.lastIndexOf('@') != s.indexOf('@')
				|| s.search(reg2) != -1)
			return false;
		
		return true;
} 

function closewindow() {
   window.close();
	}
function goto(LocationUrl) {
   window.location=LocationUrl; 
	}
	
function goback(){
   window.history.back(); 
 }
	
//禁止右键
if (window.Event) 
  document.captureEvents(Event.MOUSEUP); 
function nocontextmenu() 
{
 event.cancelBubble = true
 event.returnValue = false;
 return false;
}


function disableRightClick(e)
{
  var message = "Right click disabled";
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      alert(message);
      return false;
    }
  }
  else
  {
    return false;
  } 
document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown =nocontextmenu ; // for all others
}

//论坛搜索检验
function  bbs_search(){
with(document.SearchForm){
	if (searchvalue.value==""||searchvalue.value.length==0){
		alert("请输入关键字！");
		searchvalue.focus();
		return false;
	}
  }
}

//电话号码和email调用：
//var telinfo="服务热线：||tel||1||1&24小时值班电话：<br/>||24tel||0||0";
//参数说明:名称||类别||是否加粗(1为加粗)||颜色选择(1为red，2为yellow，0为默认颜色)
function  tel_all(telinfo){
subtel= new Array("400-8899-808<span style='font-weight:normal'>(8:00-17:00)</span>","0559-2542095","0559-2542045","15905591196","295445431","421729623","tourmart_x@live.com","tourmart_w@live.com","tourmart_h@live.com","tourmart@126.com");
subtype= new Array("tel","24tel","fax","mobi","QQ1","QQ2","MSN1","MSN2","MSN3","email");

//服务热线,24小时值班电话,传真,应急电话,QQ1,QQ2,msn1,msn2,msn3,email
//Type: tel,24tel,fax,mobi,QQ1,QQ2,msn1,msn2,msn3,email
var tel_content;
tel_content="";

for (var q=0; q<=telinfo.split("&").length-1; q++){
	for (var i=0; i<=subtype.length-1; i++){
		
		if (telinfo.split("&")[q].split("||")[1]==subtype[i]){
			if (telinfo.split("&")[q].split("||")[2]=="1"){
				if (telinfo.split("&")[q].split("||")[3]=="1"){
					tel_content+=telinfo.split("&")[q].split("||")[0]+"<span class='red'><strong>"+subtel[i]+"</strong></span>";	
				}else if(telinfo.split("&")[q].split("||")[3]=="2"){
					tel_content+=telinfo.split("&")[q].split("||")[0]+"<span class='yellow'><strong>"+subtel[i]+"</strong></span>";
				}else{
					tel_content+=telinfo.split("&")[q].split("||")[0]+"<strong>"+subtel[i]+"</strong>";
				}
			}else{
				if (telinfo.split("&")[q].split("||")[3]=="1"){
					tel_content+=telinfo.split("&")[q].split("||")[0]+"<span class='red'>"+subtel[i]+"</span>";	
				}else if(telinfo.split("&")[q].split("||")[3]=="2"){
					tel_content+=telinfo.split("&")[q].split("||")[0]+"<span class='yellow'>"+subtel[i]+"</span>";
				}else{
					tel_content+=telinfo.split("&")[q].split("||")[0]+subtel[i];
				}
			}	
			
		break;	
		}else{
			tel_content+="";
			continue;
		}
		
	}
}
document.write(tel_content);
}

//错误信息判断
function hideErrId() 
{

	if (getDiv("main_errors")){
		var lengthErr=getDiv("main_errors").getElementsByTagName("li").length;
		if (DeleteSpaces(getDiv("main_errors").innerHTML)==""||DeleteSpaces(getDiv("main_errors").innerHTML)=="<!--错误ID-->"){
			getDiv("main_errors").style.display="none";//MM_showHideLayers(strtype,'','hide');//hide("main_errors");
		}else{
			getDiv("main_errors").style.display="block";
			getDiv("main_errors").innerHTML=getDiv("main_errors").innerHTML.replace("系统提示:",errTitle);
		}
	}
}


//分页判断
function hidePageId() 
{
	if (getDiv("publicPage")){
		if (DeleteSpaces(getDiv("publicPage").innerHTML)==""){
			getDiv("publicPage").style.display="none";//MM_showHideLayers(strtype,'','hide');//hide("main_errors");
		}else{
			getDiv("publicPage").style.display="block";
		}
	}	
}

//-->