function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}


/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.comfor hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["main"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

if (document.images) {  

  image1on = new Image();
  image1on.src = "./images/nav_01_over.gif";

  image2on = new Image();
  image2on.src = "./images/nav_02_over.gif";

  image3on = new Image();
  image3on.src = "./images/nav_03_over.gif";

  image4on = new Image();
  image4on.src = "./images/nav_04_over.gif";

  image5on = new Image();
  image5on.src = "./images/nav_05_over.gif";   
  
  image6on = new Image();
  image6on.src = "./images/nav_06_over.gif";

  image7on = new Image();
  image7on.src = "./images/nav_07_over.gif";
  
  image8on = new Image();
  image8on.src = "./images/nav_08_over.gif";

  image9on = new Image();
  image9on.src = "./images/nav_09_over.gif";

  image10on = new Image();
  image10on.src = "./images/nav_10_over.gif";

  image11on = new Image();
  image11on.src = "./images/nav_11_over.gif";

  image12on = new Image();
  image12on.src = "./images/nav_12_over.gif";

  image13on = new Image();
  image13on.src = "./images/nav_13_over.gif";

  image14on = new Image();
  image14on.src = "./images/nav_14_over.gif";

  image15on = new Image();
  image15on.src = "./images/nav_15_over.gif";

  image1off = new Image();
  image1off.src = "./images/nav_01_out.gif";

  image2off = new Image();
  image2off.src = "./images/nav_02_out.gif";

  image3off = new Image();
  image3off.src = "./images/nav_03_out.gif";

  image4off = new Image();
  image4off.src = "./images/nav_04_out.gif";

  image5off = new Image();
  image5off.src = "./images/nav_05_out.gif";    

  image6off = new Image();
  image6off.src = "./images/nav_06_out.gif";

  image7off = new Image();
  image7off.src = "./images/nav_07_out.gif"; 
  
  image8off = new Image();
  image8off.src = "./images/nav_08_out.gif";

  image9off = new Image();
  image9off.src = "./images/nav_09_out.gif";

  image10off = new Image();
  image10off.src = "./images/nav_10_out.gif";

  image11off = new Image();
  image11off.src = "./images/nav_11_out.gif";

  image12off = new Image();
  image12off.src = "./images/nav_12_out.gif";

  image13off = new Image();
  image13off.src = "./images/nav_13_out.gif";

  image14off = new Image();
  image14off.src = "./images/nav_14_out.gif";

  image15off = new Image();
  image15off.src = "./images/nav_15_out.gif";

  }    

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}               






/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="whatisipia.html" class="mainlinks" target="main" target="main">What is IPIA?</a>'
menu1[1]='<a href="whyjoin.html" class="mainlinks" target="main" target="main">Why Join and Applications</a>'
menu1[2]='<a href="membercategories.html" class="mainlinks" target="main" target="main">Member Categories</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="consumertips.html" class="mainlinks" target="main">Consumer Tips</a>'
menu2[1]='<a href="consumerinfo.html" class="mainlinks" target="main">Consumer Info</a>'    
menu2[2]='<a href="pressreleases.html" class="mainlinks" target="main">Press Releases</a>'    
menu2[3]='<a href="govtrelfacts.html" class="mainlinks" target="_blank">Ice Facts</a>'    

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="executivecommittee.html" class="mainlinks" target="main">Executive Committee</a>'
menu3[1]='<a href="board.html" class="mainlinks" target="main">Board</a>'
menu3[2]='<a href="committees.html" class="mainlinks" target="main">Committees</a>'
menu3[3]='<a href="halloffame.php" class="mainlinks" target="main">Hall of Fame</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="generalinformation.html" class="mainlinks" target="main">General Information</a>'
menu4[1]='<a onclick="Start(\'http://www.packagedice.org/system/\')" href="javascript:void()" class="mainlinks" target="main">Log-in to Report Product Availability</a>'
menu4[2]='<a href="press.html" class="mainlinks" target="main">Press</a>'
menu4[3]='<a href="http://hurricane.accuweather.com/hurricane/index.asp" class="mainlinks" target="new">Hurricane Weather</a>'

//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="auditor.html" class="mainlinks" target="main">Auditor</a>'
menu5[1]='<a href="downloads/PIQCSManualFINAL.pdf" class="mainlinks" target="_blank" title="Download PIQCS/PIQCS Plus Manual (1.98MB PDF)">PIQCS Manual</a>'
menu5[2]='<a href="inspectionrepot.html" class="mainlinks" target="main">Inspection Report</a>'
menu5[3]='<a href="./downloads/PlantSanitationGuidelines.doc" class="mainlinks" target="_blank">Plant Sanitation Guidelines</a>'

//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="attentionretailers.html" class="mainlinks" target="main">Attention Retailers</a>'
menu6[1]='<a href="ads.html" class="mainlinks" target="main">Ads</a>'
menu6[2]='<a href="industrytrends.html" class="mainlinks" target="main">Industry Trends</a>'
menu6[3]='<a href="thinkingofmaking.html" class="mainlinks" target="main">Thinking of Making & Bagging Your Own?</a>'

//Contents for menu 7, and so on
var menu7=new Array()
menu7[0]='<a href="alphabetical.php" class="mainlinks" target="main">Alphabetical List</a>'
menu7[1]='<a href="producttype.php" class="mainlinks" target="main">Listed by Product Type</a>'

//Contents for menu 8, and so on
var menu8=new Array()
menu8[0]='<a href="./downloads/ANNUALIPIACOLLEGESCHOLARSHIPPROGRAM09.pdf" class="mainlinks" target="_blank">Annual IPIA College Scholarship Program 2009</a>'
menu8[1]='<a href="./downloads/IPIASCHOLARSHIPAPP10.pdf" class="mainlinks" target="_blank">IPIA Scholarship Application 2010</a>'

var disappeardelay=200  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=-5 //horizontal offset of menu from default location. (0-5 is a good value)                  
var verticaloffset=0 //vertical offset of menu from default location. (0-5 is a good value)                  
/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4){
verticaloffset=-22
}
else{
verticaloffset=-10
}

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+verticaloffset+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

