var minrestore=0;
var initialwidth,initialheight;
var ie5=document.all&&document.getElementById;
var ns6=document.getElementById&&!document.all;

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function scroll_top1(){

if (!ie5&&!ns6)
{}
else{
document.getElementById("dwindow").style.top=ns6? "0px" : "0px";
window.scrollTo(0,0);

}
}


function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"pop1","width=355,height=220,scrollbars=1");
else{
document.getElementById("dwindow").style.display='';
document.getElementById("dwindow").style.width=initialwidth=width+"px";
document.getElementById("dwindow").style.height=initialheight=height+"px";
document.getElementById("dwindow").style.left="320px";
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+260+"px" : iecompattest().scrollTop*1+260+"px";
document.getElementById("cframe").src=url;
}
}

function maximize(){
if (minrestore==0){
minrestore=1; //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif");
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px";
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px";
}
else{
minrestore=0; //restore window
document.getElementById("maxname").setAttribute("src","max.gif");
document.getElementById("dwindow").style.width=initialwidth;
document.getElementById("dwindow").style.height=initialheight;
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px";
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px";
}

function closeit(){
document.getElementById("dwindow").style.display="none";
}





 
 var expDays = 90; // number of days the cookie should last
 
 var page = "http://www.geplastics.com/resins/designsolution/tools/disclaimers/welcome.html";
 var windowprops = "width=640,height=400,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";
 
 function GetCookie (name) {  
 var arg = name + "=";  
 var samlen = arg.length;  
 var tomlen = document.cookie.length;  
 var i = 0;  
 while (i < tomlen) {    
 var j = i + samlen;    
 if (document.cookie.substring(i, j) == arg)   
 return getCookieVal (j);    
 i = document.cookie.indexOf(" ", i) + 1;    
 if (i == 0) break;   
 }  
 return null;
 }
 function SetCookie (name, value) {  
 var argv = SetCookie.arguments;  
 var argc = SetCookie.arguments.length;  
 var expires = (argc > 2) ? argv[2] : null;  
 var path = "/";  
 var domain = (argc > 4) ? argv[4] : null;  
 var secure = (argc > 5) ? argv[5] : false;  
 document.cookie = name + "=" + escape (value) + 
 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
 ((path == null) ? "" : ("; path=" + path)) +  
 ((domain == null) ? "" : ("; domain=" + domain)) +    
 ((secure == true) ? "; secure" : "");
 }
 
 
 function getCookieVal(offset) {
 var endstr = document.cookie.indexOf (";", offset);
 if (endstr == -1)
 endstr = document.cookie.length;
 return unescape(document.cookie.substring(offset, endstr));
 }
 
 function checkpoppy() {

 var poppy = GetCookie('pop');

 if (poppy == null||poppy == 'notnow') {
 poppy='go';
 
loadwindow('http://www.geplastics.com/resins/survey/survey_pop.html',340,220);
 
 }
 
 }
 
