﻿// JavaScript Document
          function bluring(){


          if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
          }
document.onfocusin=bluring;

function getParameValue(paraName,win)

        { 
        
        // 获取地址栏指定变量(paraName)的值
         
            if(win==null) win=self;
             var paraStr=win.location.search.slice(1);
             var paraList=paraStr.split(/\&/g);
                            for(var i=0;i<paraList.length;i++)
                               {
                               var pattern=new RegExp("^"+paraName+"[?=\\=]","g");
                               if(pattern.test(paraList[i]))                       
                               return paraList[i].split(/\=/g)[1];
                               
                               }        
        }
        
        
        
        
        function getParameValue2(paraName,win)

        { 
        
        // 获取地址栏指定变量(paraName)的值
         
            if(win==null) win=self;
             var paraStr=win.location.search.slice(1);
             var paraList=paraStr.split(/\|/g);
                            for(var i=0;i<paraList.length;i++)
                               {
                               var pattern=new RegExp("^"+paraName+"[?=\\=]","g");
                               if(pattern.test(paraList[i]))                       
                               return paraList[i].split(/\=/g)[1];
                               
                               }        
        }





									
function setWinHeight(iframeObj)

{
debugger;
// 让包含iframe框架的层的高度与iframe内容高度自动适应
	if (document.getElementById)
            if (iframeObj )  
	              if(!window.opera)
		        	if (iframeObj.contentDocument)
		        	           {
			                 if(iframeObj.contentDocument.body.offsetHeight)
			                	iframeObj.height = iframeObj.contentDocument.body.offsetHeight; 
			   	
			                	}
			   	
			   	
	else   {
                           if (document.frames[iframeObj.name].document ) 
							 if(document.frames[iframeObj.name].document.body.scrollHeight){
							 
   					              var bHeight = iframeObj.contentWindow.document.body.scrollHeight;
                                  var dHeight = iframeObj.contentWindow.document.documentElement.scrollHeight;
                                var height = Math.max(bHeight, dHeight);
                                 iframeObj.height =  height;
           
   					               } 



			   	}
				
				}
				
				
							
				
function getCookie(parameter)
{

// 获取cookie值
var reg,allCookie,allCookie2,iLen,iStart,iEnd;
allCookie = document.cookie;
reg = new RegExp(parameter);
if(allCookie.search(reg) == -1){
   return "";
}
else{
   iLen = parameter.length;
   iStart = allCookie.search(reg) + iLen +1;
   allCookie2 = allCookie.substr(iStart);
   iEnd = iStart + allCookie2.search(/[&;]/i); 
   if((iStart - 1) == iEnd){
    return allCookie.substr(iStart);
   }
   else{
    return allCookie.substr(iStart,iEnd - iStart);
   }
}
}




