﻿//文字闪烁的代码
function changeColor(){
var color="#33f|#0f0|#000|#880|#808|#088|yellow|green|blue|gray";
color=color.split("|");
document.getElementById("blink").style.color=color[parseInt(Math.random() * color.length)];
}
setInterval("changeColor()",200);

 function calculate() {
		
	
		var ss;
		
	       
	           	ss= document.getElementById("select1").options.value;
			      
			      document.getElementById("searchstr").value=ss ; 

				
	}
	 function calculate1() {
		
	
		var ss;
		
	       
	           	ss= document.getElementById("select2").options.value;
			      
			      document.getElementById("searchstr1").value=ss ; 

				
	}
	
function searchs()
{
var ss= document.getElementById("searchstr").value;
var	ss1=document.getElementById("searchstr1").value
var sss1=document.getElementById("keywords").value;

var s=encodeURIComponent(sss1) ;
var s1=encodeURIComponent(ss1) 
  var purl;
 switch(ss)
            {
                case "1":
             purl="search.aspx?keyword="+s+"&area=null";
               window.location.href=purl;
             break ;
             case "2":
             purl="search.aspx?keyword="+s+"&area="+s1;
                window.location.href=purl;
              break ;
              case "3":
              var url="http://www.baidu.com/baidu?wd="+s+"&cl=3&tn=56473_pg";
  var w=760;
            var h=480;
            var adPopup = window.open(purl, '_blank','width='+w+',height='+h+', ...');
            adPopup.blur();
            adPopup.opener.focus();
            adPopup.location = url;
 $E.removeListener(document.body, 'click', arguments.callee);
            return adPopup;
              break ;
       }   

}


if (!document.getElementById) 
document.getElementById = function() { return null; } 
function initializeMenu(actuatorId,menuId) { 



var menu = document.getElementById(menuId); 
var actuator = document.getElementById(actuatorId); 
if (menu == null || actuator == null) return; 
actuator.parentNode.style.backgroundImage = "url(/sg/template/default/images/p3.gif)"; 
actuator.onclick = function() { 

var display = menu.style.display; 
this.parentNode.style.backgroundImage = 
(display == "block") ? "url(/sg/template/default/images/p3.gif)" : "url(/sg/template/default/images/m3.gif)"; 

menu.style.display="none";
menu.style.display = (display == "block") ? "none" : "block"; 


return false; 
} 
} 

window.onload = function() {

var s

for(s=0;s<8;s++)
{

initializeMenu("A"+s, "U"+s);
} 

/*if(document.getElementById("header_title").innerText!="")
{

document.title= document.getElementById("header_title").innerHtml+"-"+"powered by qiangxun163.com sg";
}*/
       
} 



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 Showimg(src,title,widths,heights)
         {
         var html="<img src="+src+" width =\"600px\" height =\"500px\" />";
             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"];
            
         }
