
if(!/Safari/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) { 
if(doPopup(popType,popDiv)) {
      
function getMessageContent(){
   var isIE = document.all?true:false;
   var ranum=Math.floor(Math.random()*msgContent.length);
    
   messageContent=msgContent[ranum];
   popupHeight=msgHeight[ranum];
   popupWidth=msgWidth[ranum];
   if(isIE) {
      inCenter=msgIEinCenter[ranum];
   } 
   else {
      inCenter=msgFFinCenter[ranum];
   }
     
   return (messageContentPath+messageContent);
}


function returnObjById(id) {
   if(document.getElementById)
      returnVar = document.getElementById(id);
   else if(document.all) 
      returnVar = document.all[id]; 
   else if(document.layers) 
      returnVar = document.layers[id]; 
   return returnVar; 
}

var dhtmlwindow={
init:function(t, content, attr){
   function getValue(Name){
      var config=new RegExp(Name+"=([^,]+)", "i")
      return (config.test(attr))? parseInt(RegExp.$1) : 0 
   }
   
   var domwindow=document.createElement("div")
   domwindow.id=t
   domwindow.className="dhtmlwindow"
   returnObjById("dhtmlwindowholder").appendChild(domwindow) 
   var t=returnObjById(t)
   t.show=function(){dhtmlwindow.show(this)}
   t.setSize=function(w, h){dhtmlwindow.setSize(this, w, h)}
   t.moveTo=function(x, y){dhtmlwindow.moveTo(this, x, y)}
   t.load=function(contentsource){dhtmlwindow.load(this, contentsource)}
   t.setSize(getValue(("width")), (getValue("height")))
   var xpos=getValue("center")? getValue(("width")) : getValue("left")
   var ypos=getValue("top")? getValue("top") : "middle"
   t.moveTo(xpos, ypos)
   t.load(content);
   return t
},

setSize:function(t, w, h){
   t.style.width=Math.max(parseInt(w), 150)+"px"
   t.style.height=Math.max(parseInt(h), 100)+"px"
},

moveTo:function(t, x, y){
   this.getviewpoint()  
   t.style.left=(x=="30")? x +"px" : this.scroll_left+(this.docwidth/2 - x/2) +"px"
   t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},

load:function(t, contentsource){
   t.style.overflow="visible"
   t.innerHTML='<iframe id="_iframe-'+t.id+'" src="blank.html" class="iframearea" name="_iframe-'+t.id+'" scrolling="no" frameborder="0" ALLOWTRANSPARENCY="true" marginheight="0" marginwidth="0"></iframe>'
   window.frames["_iframe-"+t.id].location.replace(contentsource)
   t.datatype="iframe"  
},

getviewpoint:function(){
   var ie=document.all && !window.opera
   var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000
   this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
   this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
   this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
   this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
   this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},

show:function(t){
   t.style.visibility="visible"
   t.style.display="block"
   t.style.zIndex=2147483647
   setPopupCookies(isSubmit,popDiv)
   //trigger omniture
   if ( typeof( window[ 's' ] ) != "undefined" ) {
      s.pageName = document.getElementById("_iframe-popupbox").contentWindow.document.title; 
      s.prop7=''; 
      s.prop9='';
      s.prop10='';
      s.prop13='';
      s.eVar7='';
      s.eVar9='';
      s.eVar10='';
      s.eVar13='';
      s.t()
   }
   this.writeTag(t)
}

,writeTag:function(t){
   var ie=document.all && !window.opera
   iframe = returnObjById("_iframe-"+t.id)
   if(iframe.contentDocument) {  
      // Firefox, Opera   
      iframe.doc = iframe.contentDocument;
   } else if(iframe.contentWindow)    {
      // Internet Explorer   
      iframe.doc = iframe.contentWindow.document; 
   } else if(iframe.document) {  
      // Others?   
      iframe.doc = iframe.document;        
   }
   if(iframe.doc != null){ 
      tagSrc = iframe.doc.forms['leadForm'].elements['tag'].value;
      if( (tagSrc != '') && ( typeof( window[ 'tagType' ] ) != "undefined" ) ) {
         parentID = '';
         newTag = iframe.doc.createElement(tagType);
	 if(tagType.toLowerCase() == 'script') {
	    parentID = iframe.doc.getElementsByTagName("head")[0];         
	    newTag.type = 'text/javascript';
	 } else if(tagType.toLowerCase() == 'img') {
	    parentID = iframe.doc.getElementsByTagName('body')[0];
	    newDiv = iframe.doc.createElement('div');
	    newDiv.id = 'tracktagDiv';
	    newDiv.style.visibility='hidden';
	    newDiv.style.display = 'none';
	    parentID.appendChild(newDiv);
	    parentID = iframe.doc.getElementById('tracktagDiv');
	    newTag.alt='';
	 }
	 newTag.src = tagSrc;
	 if(parentID != '') {
	    parentID.appendChild(newTag);
         }
      }
   } 
}
}
document.write('<div id="dhtmlwindowholder"><span style="display:none;">.</span></div>')

function getMouseXY(e) {
   if (showonce == 1) return;
   if (displaypopup == 0) return;
   if (IE) {
      tempX = event.clientX;
      tempY = event.clientY;
   } else {
      tempX = e.pageX - document.body.scrollLeft;
      tempY = e.pageY - document.body.scrollTop;
   } 
   if (tempX < 0){tempX = 0;}
   if (tempY < 0){tempY = 0;}  
   if (tempY < 20 ) {
      popupwin.show();
      showonce=1;
   }
}

function resizeIFramePop(){
   var ie=document.all && !window.opera
   if(ie) {
      h = returnObjById("_iframe-popupbox").contentWindow.document.body.scrollHeight;
      w = returnObjById("_iframe-popupbox").contentWindow.document.body.scrollWidth;
   } else {
      h=parseInt(returnObjById("_iframe-popupbox").contentDocument.height)+16
      w=parseInt(returnObjById("_iframe-popupbox").contentWindow.innerWidth)+parseInt(returnObjById("_iframe-popupbox").contentWindow.scrollMaxX)
   }
   dhtmlwindow.setSize(popupwin,w,h);
}

var start = 0;
var popupwin = dhtmlwindow.init('popupbox', "/wps/wcm/connect/"+getMessageContent(),"width="+popupWidth+",height="+popupHeight+",resize=0,scrolling=0,"+inCenter);
var showonce = 0;
var displaypopup = 0;

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;

function wakeuppopup() {
   displaypopup = 1;
}

setTimeout('wakeuppopup()', 2000);

}//if no cookie
}//if not safari
