if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
    var browserversion = parseInt(navigator.appVersion);
    if(browserversion < 7)
    {
	    window.attachEvent("onload", fnLoadPngs);
	}
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300');");
}

function hiLite(imgDocID, imgObjName, comment) 
{
        document.images[imgDocID].src = eval(imgObjName + ".src");
        return true;    
}


function fnLoadPngs() 
{	
    var images;
    if(document.title == "Don Humberto & Gringo's Fine Colombian Coffee")
    {
    images = new Array(document.vertical,  document.donandalan, document.steam);
    }
    
    else if(document.title == "Original")
    {
        images = new Array(document.small_logo, document.sell_products, document.originalbag);
    }
       
    else if(document.title == "ProductTemplate")
    {
        images = new Array(document.small_logo, document.sell_products, document.originalbag);
    }
    else if(document.title =="Smooth")
    {
        images = new Array(document.small_logo, document.sell_products, document.smoothbag);
     }
     else if (document.title=="Hardcore")
     {
        images = new Array(document.small_logo, document.sell_products, document.hardcorebag);
     }
     else if(document.title == "Decaf")
     {
        images = new Array(document.small_logo, document.sell_products, document.decafbag);
     }
     else if (document.title == "ContactUs")
     {
        images = new Array(document.small_logo, document.sign, document.sell, document.bag);
     }
     else if(document.title == "A Tale of Two Friends")
     {
        images = new Array(document.small_logo, document.donandalan);
        }
        
    for(var index = 0; index < images.length;++index)
    {
        var img = images[index];
        var src = img.src;
	    var div = document.createElement("DIV");
	    div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')"
	    div.style.width = img.width + "px";
	    div.style.height = img.height + "px";

	    img.style.visibility = "visible";
	    img.replaceNode(div);
	}   	       
}

/*function SwapOut(var imageSrc) 
{
    for(var index = 0; index < images.length;++index)
    {
        img = document.images[index])
        if(img.src = imageSrc)
        {
            document.imageflip.src = img.src; return true;
        }
    }
}

function SwapBack(var imageSrc) 
{
   for(var index = 0; index < images.length;++index)
    {
        img = document.images[index])
        if(img.src = imageSrc)
        {
            document.imageflip.src = img.src; return true;
        }
    }
}*/



