//验证浏览器 var isNav, isIE if (parseInt(navigator.appVersion) >= 4) { if (navigator.appName == "Netscape") { isNav = true } else { isIE = true } } //自定义打开窗口 function openwindow(url,win_w,win_h,win_s){ win_l=(screen.width-win_w)/2; win_t=(screen.height-win_h)/2; window.open(url,"","width="+win_w+",height="+win_h+",top="+win_t+",left="+win_l+",scrollbars="+win_s); } //360度全景展示 function open360(id){ win_w=420; win_h=350; win_l=(screen.width-win_w)/2; win_t=(screen.height-win_h)/2; window.open("360.asp?id="+id,"show360","width="+win_w+",height="+win_h+",top="+win_t+",left="+win_l); } //快速翻页 function gopage(select_obj){ var url = select_obj.options[select_obj.selectedIndex].value; if(url == '') return; else window.location.href=url; return; } //快速链接 function openurl(select_obj){ var url = select_obj.options[select_obj.selectedIndex].value; if(url == '') return; else self.open(url,"_blank"); return; } //日期选择 function calendar(form_v,field_v){ l=(screen.width-190)/2; t=(screen.height-140)/2; window.open("include/calendar.asp?form="+form_v.name+"&field="+field_v.name+"&datev="+field_v.value,"calendarwindow","directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,top="+t+",left="+l+",width=190,height=140"); } //打开视频 function open_player(title,url,dir,IsAutoPlay){ w=500; h=400; l=(screen.width-w)/2; t=(screen.height-h)/2-50; vw=window.open("video/player.asp?title="+title+"&url="+url+"&dir="+dir+"&IsAutoPlay="+IsAutoPlay,"player","width="+w+",height="+h+",left="+l+",top="+t+",alwaysRaised=yes") vw.focus(); } //iframe自适应高度 function SetWinHeight(obj){ var win=obj; if (document.getElementById){ if (win && !window.opera){ if (win.contentDocument && win.contentDocument.body.offsetHeight) win.height = win.contentDocument.body.offsetHeight; else if(win.Document && win.Document.body.scrollHeight) win.height = win.Document.body.scrollHeight; } } } //强制对象 function $(id) { return (typeof(id)=='object') ? id : document.getElementById(id); } //获取地址栏参数值,方法:var Request=new QueryString();ID=Request["ID"] function QueryString(){ var name,value,i; var str=location.href; var num=str.indexOf("?") str=str.substr(num+1); var arrtmp=str.split("&"); for(i=0;i < arrtmp.length;i++){ num=arrtmp[i].indexOf("="); if(num>0){ name=arrtmp[i].substring(0,num); value=arrtmp[i].substr(num+1); this[name]=value; } } } //打印局部内容 function doPrint(startprint,endprint) { bdhtml=window.document.body.innerHTML; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+9+startprint.length); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML="
"+prnhtml+"
"; window.print(); window.document.body.innerHTML=bdhtml; }