// script needed in header on pages that calls the cross-sale table (CrossSale.js) //alert("cross sales javascript - loaded"); function initIframeSpares( id, itype, ccc, prods,source) { var session = getCookie('LtpaToken'); if (session == null || session == '') { var session = getCookie('DomAuthSessId'); } var online = false; if (session != null && session != '' ) { online = true; } if ( online ) { ccc = getCookie( "profilecountryident" ); } var uri = "target=" + id + "&cc=" + ccc + "&intype=" + itype + "&prods=" + prods+"&source=" + source; //alert(uri); var obj = document.getElementById( id ); var agent = navigator.userAgent.toLowerCase(); var major = parseInt(navigator.appVersion); var ie = (agent.indexOf("msie") != -1); var ie5 = (ie && (major == 4) && (agent.indexOf("msie 5.0") != -1)); var ie5Mac = (ie && (major == 4) && (agent.indexOf("mac") != -1)); //alert(agent); //alert(major); if ( !ie5 ) { var iframe = document.createElement( "IFRAME" ); with ( iframe.style ) { //display = "none"; height = "0px"; width = "0px"; //border = "0px"; visibility = "hidden"; } if ( document.all ) { iframe.src = "/ezm/crossprod.nsf/grogg23Spares?OpenAgent&" + uri; var head = document.getElementById( "headhomepage" ); head.appendChild( iframe ); } else { document.body.appendChild( iframe ); iframe.src = "/ezm/crossprod.nsf/grogg23Spares?OpenAgent&" + uri; } } else { document.write( '\<\/iframe>' ); } } function CrossNavOpenSpares(url,name,winWidth,winHeight){ // gets the variables used to position the new window in the center of the screen. if (document.all){ var xMax = screen.width, yMax = screen.height; } else { var xMax = 640, yMax=480; } var xOffset = (xMax - 350)/2, yOffset = (yMax - 400)/2; window.open(url,name,'width='+winWidth+',height='+winHeight+',top='+yOffset+',left='+xOffset+',scrollbars'); }