﻿// JScript File
var iYpos=0
var iXpos=0
var iXMain=0
var iYMain=0

function toolPop(sID){
    var sTable=''
    var oparent = document.getElementById(sID).offsetParent; //TD
    var osleft = document.getElementById(sID).offsetLeft;
    var osWidth = document.getElementById(sID).offsetWidth;
    var osTop = document.getElementById(sID).offsetTop;
    
    //iXpos=((parseInt(document.getElementById(sID).offsetLeft))+parseInt(document.getElementById(sID).offsetWidth));
    //iYpos=((parseInt(document.getElementById(sID).offsetHeight)/2)+parseInt(document.getElementById(sID).offsetTop));
    iXpos=osWidth+osleft;
    iYpos=osTop;
    iXMain=oparent.offsetLeft;
    iYMain=oparent.offsetTop+document.getElementById('tbl1').offsetTop;
    
    //document.getElementById('testMe').outerHTML=oparent.offsetLeft
    
    if (sID=='krispPaklink'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;KrispPak&trade; &nbsp;&nbsp;Microperforated Bags</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/KrispPak.gif border=0 alt='KrispPak Microperforated Bag' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>KrispPak&trade; Microperforated bags are the premier packaging solution for all artisan and crusty breads.  Our bags are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 0.8mil BOPP</li><li>FDA approved for food contact</li><li>wicketed to ease of handling and machinability</li><li>unperforated on the top and bottom for added strength</li><li>linear perforated on the header to break away cleanly from the lip</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='G5link'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;G5&trade; &nbsp;&nbsp;Zippered Standup Pouches</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/G5.gif border=0 alt='G5 Zippered Standup Pouches' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>G5&trade; Pouches are highest quality packaging solution available on the market today.  The high barrier and ultra-durable materials make this an ideal solution for confectionary, powders, dry foods, and spices. All pouches are made from FDA approved films and are available with a reclosable zipper and hang holes.</td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='moreClearL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;MorClear&trade; &nbsp;&nbsp;Cello Bags</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/MorClear.gif border=0 alt='MorClear Cello Bag' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>MorClear&trade; bags are the crystal clear solution for packaging candies, cookies, and sandwiches.  These bags are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 1.2mil BOPP</li><li>FDA approved for food contact</li><li>made with a solid back-seam construction</li><li>avialable in two bottom-seam styles: crimped and folded</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='crystalWrapL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;CrystalWrap&trade; &nbsp;&nbsp;Clear Deli Sheets</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/CrystalWrap.gif border=0 alt='Crystalwrap Deli sheet' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>CrystalWrap&trade; clear deli sheets is the premier choice in wrapping and display of deli-style sandwiches.  Our sheets are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 0.8mil BOPP</li><li>FDA approved for food contact</li><li>heat-sealable</li><li>impermeable to liquids unlike waxy paper</li><li>display your products more clearly, increasing sales</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='savorLink'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;SavorSleeve&trade; &nbsp;&nbsp;Clear Deli Wallet Folded Sheets </td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/SavorSleeve.gif border=0 alt='G5 Zippered Standup Pouches ' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>SavorSleeve&trade; deli sheets are an improvement over our high successful CrystalWrap&trade; brand.  Unlike paper based wallet folds our sheets are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 1.2mil BOPP</li><li>FDA approved for food contact</li><li>easier and more consistent to use than flat sheets</li><li>market your products better than paper</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='softLink'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;SoftBag&trade; &nbsp;&nbsp;Polypropylene Bakery Bags</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/SoftBag.gif border=0 alt='SoftBag Polypropylene Bakery Bags' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>SoftBag&trade; Polypropylene Bakery  Bags are the upgraded version of the standard 'poly bag'.  These bags are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 1mil CPP</li><li>FDA approved for food contact</li><li>hot-pinned with wicket holes for ease of handling and machinability</li><li>made of clearer materials than standard 'poly bags'</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='vueLink'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;BrightVue&trade; &nbsp;&nbsp;Crystal Clear Wrapping Films</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/BrightVue.gif border=0 alt='BrightVue floral wrapping film' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>BrightVue&trade; clear wrapping films are ideal for floral and gift basket overwrapping.  Our film is<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 1mil BOPP</li><li>FDA approved for food contact</li><li>individually poly-wrapped</li><li>offers superior clarity and gloss when compared with competitive products</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='mailLink'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;USPS approved Polywrap Mail Envelopes</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/Mailer.gif border=0 alt='USPS approved Polywrap' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>Our crystal clear USPS approved polywrap envelopes are the leading choice among mail houses!  Our envelopes are<ul style=\'margin-top:7px; margin-left:25px;\'><li>made from crystal clear 1.2mil BOPP</li><li>DMM compliant USPS approved polywrap</li><li>ideal for mass mailing of high-end literature</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";  
    }
    else if (sID=='polibakL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;Polibak Plastics</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/polibakLine.jpg border=0 alt='Polibak Plastics' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>Established in 1992, Polibak supplies us with polypropylene base films. With 3 BOPP lines, 1 CPP extruder, and 3 metallizers Polibak has an annual capacity exceeding 50,000 tons of film. <br><br>Polibak produces:<ul style=\'margin-top:7px; margin-left:25px;\'><li>Biaxially Oriented Polypropylene</li><li>Cast Polypropylene</li><li>Metallized base films</li><li>Ultra High-Barrier Metallized BOPP</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";     
    }
    else if (sID=='bareksL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;Bareks</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/bareksLine.jpg border=0 alt='Bareks' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>Established in 2002, Bareks manufactures various polyethylene base films. With 7 extruders, Bareks has an annual capacity exceeding 10,000 tons and can produce mono, three, and seven layer films. <br><br>Besides lamination films, Bareks produces:<ul style=\'margin-top:7px; margin-left:25px;\'><li>High Barrier Films with PA or EVOH</li><li>Paper-like Films</li><li>Peelable Lidding Films</li><li>Burst-Peel Films</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";     
    }
    else if (sID=='gravureL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;Gravure International</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/gravureLine.jpg border=0 alt='Gravure International' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>Established in 1998, Gravure International produces high quality rotogravure cylinders and flexo plates. With their state of the art graphics department, Gravure International guarantees a 95%+ color match of contract proofs.  <br><br>Gravure International:<ul style=\'margin-top:7px; margin-left:25px;\'><li>manages all pre-press</li><li>engraves rotogravure cylinders</li><li>manufactures flexographic plates</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";     
    }
    else if (sID=='bakL'){
        sTable="<table cellpadding=0 cellspacing=0 border=0 width=500 height=300 bgcolor=#6495ed background=images/gradientS.gif>"
        sTable+="<tr><td bgcolor=#000000 align=left class=toolHead>&nbsp;Bak Ambalaj</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1 /></td></tr>"
        sTable+="<tr><td align=center>"
            sTable+="<table cellpadding=0 cellspacing=0 border=0 width=95%><tr>"
            sTable+="<td colspan=2 height=5><img src=images/clear.gif height=5 /></td></tr>"
            sTable+="<tr><td valign=middle align=center width=165><img src=images/bakLine.jpg border=0 alt='Bak Ambalaj' /><br><br>&nbsp;</td>"
                sTable+="<td valign=top align=left>Established in 1973, Bak Ambalaj handles all of our printing, lamination, slitting, and finish conversion. With 5 gravure and 7 gearless flexo presses, Bak Ambalaj has an annual capacity exceeding 10 billion ft2.<br><br>Bak Ambalaj has the capability to:<ul style=\'margin-top:7px; margin-left:25px;\'><li>print in both Flexo and Gravure</li><li>perform wet & dry adhesive lamination</li><li>finish conversion into bags, sheets, and pouches</li></ul></td></tr></table>"
        sTable+="</td></tr>"
        sTable+="<tr><td bgcolor=#ffffff height=1><img src=images/clear.gif height=1></td></tr>"
        sTable+="<tr><td bgcolor=#000000 height=5><img src=images/clear.gif height=5></td></tr></table>";     
    }
    
    pausecomp(250);
    
    document.getElementById(sID).onmousemove=positiontip;  
    
    //now render the tooltip
    if (sTable!='') ddrivetip(sTable);
}

function pausecomp(millis) {
    var date = new Date();
    var curDate = null;

    do { curDate = new Date(); } 
    while(curDate-date < millis);
} 
