﻿
var lang = new Array();
var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);

function $(id) {
	return document.getElementById(id);
}

Array.prototype.push = function(value) {
	this[this.length] = value;
	return this.length;
}


function isUndefined(variable) {
	return typeof variable == 'undefined' ? true : false;
}


 function ShowIframe(url,title,widths,heights)
         {
         var pop=new Popup({ contentType:1,isHaveTitle:true,isReloadOnClose:false,scrollType:'on',isBackgroundCanClick:false,isSupportDraging:true,isShowShadow:true, width:410, height:150 });
       
             pop.setContent("contentUrl",url);
             pop.setContent("title",title);
             pop.setContent("width",widths);
             pop.setContent("height",heights);
             pop.build();
             pop.show();
         }
       
         function ShowHtmlString(url,title,widths,heights)
         {
             var strHtml = "<table border=1 style='width:90%; text-align:center;'><tr style='height:40px'><td>ds</td><td>dads</td></tr><tr style='height:40px'><td>dadas</td><td>dasd</td></tr><tr style='height:40px'><td>dadasd</td><td>dsadads</td></tr></table>";
             var pop=new Popup({ contentType:2,isReloadOnClose:false,width:340,height:300});
             pop.setContent("contentUrl",url);
             pop.setContent("title",title);
             pop.setContent("width",widths);
             pop.setContent("height",heights);
             pop.build();
             pop.show();
         }
         function ShowConfirm(html,title,widths,heights)
         {
             var pop=new Popup({ contentType:3,isReloadOnClose:false,scrollType:true,isBackgroundCanClick:false,width:340,height:80});
             pop.setContent("title",title);
             pop.setContent("confirmCon",html);
             pop.setContent("callBack",ShowCallBack);
             pop.setContent("parameter",{id:"divCall",str:"点击确定后显示的字符串",obj:pop});
              pop.setContent("width",widths);
             pop.setContent("height",heights);
             pop.build();
             pop.show();
         }
         function ShowAlert(html,title,widths,heights)
         {
             var pop=new Popup({ contentType:4,isReloadOnClose:false,isBackgroundCanClick:false,width:340,height:80});
             pop.setContent("title",title);
             pop.setContent("alertCon",html);
              pop.setContent("width",widths);
             pop.setContent("height",heights);
             pop.build();
             pop.show();
         }
        
        
         function ShowCallBack(para)
         {
             var o_pop = para["obj"]
             var obj = document.getElementById(para["id"]);
             o_pop.close();
             obj.innerText = para["str"];
            
         }
           //////

         function tabit(id,cid) {

        tab.className="main_taboff";
        tab1.className="main_taboff";
        tab2.className="main_taboff";
        tab3.className="main_taboff";
        tab4.className="main_taboff";
       tab5.className="main_taboff";
       tab6.className="main_taboff";
       id.className="main_tabon";
        
tds.style.display="none";
tds1.style.display="none";
tds2.style.display="none";
tds3.style.display="none";
tds4.style.display="none";
tds5.style.display="none";
tds6.style.display="none";
cid.style.display="block";


}
  function tabit1(id,cid) {

        tabs.className="main_taboff";
        tabs1.className="main_taboff";
        tabs2.className="main_taboff";
        tabs3.className="main_taboff";
        tabs4.className="main_taboff";
       tabs5.className="main_taboff";
       tabs6.className="main_taboff";
       id.className="main_tabon";
        
tdss.style.display="none";
tdss1.style.display="none";
tdss2.style.display="none";
tdss3.style.display="none";
tdss4.style.display="none";
tdss5.style.display="none";
tdss6.style.display="none";
cid.style.display="block";


}
     function tabit2(id,cid) {

        tab.className="main_taboff";
        tab1.className="main_taboff";
        tab2.className="main_taboff";
        tab3.className="main_taboff";
        tab4.className="main_taboff";
         tab5.className="main_taboff";
       id.className="main_tabon";
        
tds.style.display="none";
tds1.style.display="none";
tds2.style.display="none";
tds3.style.display="none";
tds4.style.display="none";
tds5.style.display="none";
cid.style.display="block";


}
function showid(str,id)
 {
switch(id)
       {
           case "1":
           document.getElementById(str).style.display="block";
               break;
               case "2":
           document.getElementById(str).style.display="none";
               break;
       }


 }
   
