﻿
var delay = "2";  //############# How long before window appears (seconds)
var winw = "300"; //############# How wide should your window be (pixels)
var winh = "350"; //############# How tall should the window be (pixels)
var repeat = "1"; //Do you want visitor to be able to re-open window after closing?
//############# published at: scripts.tropicalpcsolutions.com
var ie=(document.all);
var ns=(document.layers);
var ns6=(document.getElementById && !ie);
var calculate=ns? "" : "px"
function loadElement(no){
if(!ns && !ie && !ns6) return;
if(ie) popup=eval('document.all.elementDiv.style');
else if(ns) popup=eval('document.layers["elementDiv"]');
else if(ns6) popup=eval('document.getElementById("elementDiv").style');
if (ie||ns6) popup.visibility="visible";
else popup.visibility ="show";
displayElement()
document.getElementById("image1").src = "";
if (document.getElementById("image1").src == "") {
    document.getElementById("image1").style.cursor = wait;
}


if (no == 1) {
    document.getElementById("image1").innerHTML = "Vitroman";
    document.getElementById("image1").src = "images/Vitroman_Formula_XP.jpg";
    document.getElementById("image1").alt = "Vitroman Formula XP";
    document.getElementById("image1").title = "Vitroman Formula XP";
    
        }
else if (no == 2) {
document.getElementById("image1").src = "images/Vitroman_HerbalGel.jpg";
document.getElementById("image1").alt = "Vitroman Herbal Gel";
    document.getElementById("image1").title = "Vitroman Herbal Gel";
}
else if (no == 3) {
document.getElementById("image1").src = "images/VitromanPowerplus.jpg";
document.getElementById("image1").alt = "Vitroman Powerplus";
document.getElementById("image1").title = "Vitroman Powerplus";
}
else if (no == 4) {
document.getElementById("image1").src = "images/VitromanTongkatAli.jpg";
document.getElementById("image1").alt = "Vitroman TongkatAli";
document.getElementById("image1").title = "Vitroman TongkatAli";
}
else if (no == 5) {
document.getElementById("image1").src = "images/VitromanXPower.jpg";
document.getElementById("image1").alt = "Vitroman XPower";
document.getElementById("image1").title = "Vitroman XPower";
}
else if (no == 6) {
document.getElementById("image1").src = "images/MiriFeminineEssence.jpg";
document.getElementById("image1").alt = "Miri Feminine Essence";
document.getElementById("image1").title = "Miri Feminine Essence";
}
else if (no == 7) {
document.getElementById("image1").src = "images/MiriBeautyRevital.jpg";
document.getElementById("image1").alt = "Miri Beauty Revital";
document.getElementById("image1").title = "Miri Beauty Revital";
}
else if (no == 8) {
    document.getElementById("image1").src = "images/zero sugar.jpg";
    document.getElementById("image1").alt = "Rootking Zero Sugar";
    document.getElementById("image1").title = "Rootking Zero Sugar Capsules";
}
else if (no == 9) {
    document.getElementById("image1").src = "images/roselle.jpg";
    document.getElementById("image1").alt = "Rootking Roselle";
    document.getElementById("image1").title = "Rootking Roselle Capsules";
}
else if (no == 10) {
    document.getElementById("image1").src = "images/easy slim.jpg";
    document.getElementById("image1").alt = "Rootking Easy Slim";
    document.getElementById("image1").title = "Rootking Easy Slim Capsules";
}
else if (no == 11) {
    document.getElementById("image1").src = "images/black garlic.jpg";
    document.getElementById("image1").alt = "Rootking Black Garlic";
    document.getElementById("image1").title = "Rootking Black Garlic Capsules";
}
else if (no == 12) {
    document.getElementById("image1").src = "images/energy.jpg";
    document.getElementById("image1").alt = "Rootking Energy";
    document.getElementById("image1").title = "Rootking Energy Capsules";
}
else if (no == 13) {
    document.getElementById("image1").src = "images/Life Spring Aliplus.jpg";
    document.getElementById("image1").alt = "Life Spring Aliplus";
    document.getElementById("image1").title = "Life Spring Aliplus Capsules";
}
else if (no == 14) {
    document.getElementById("image1").src = "images/Life Spring Vitality.jpg";
    document.getElementById("image1").alt = "Life Spring Vitality";
    document.getElementById("image1").title = "Life Spring Vitality Capsules";
}
}
function displayElement(){
var agent=navigator.userAgent.toLowerCase();
if (ie){
	documentWidth = (centerElement().offsetWidth)/2+centerElement().scrollLeft-(winw/2);
	documentHeight = (centerElement().offsetHeight)/2+centerElement().scrollTop-(winh/2);
}
else if (ns){
	documentWidth=window.innerWidth/2+window.pageXOffset-(winw/2);
	documentHeight=window.innerHeight/2+window.pageYOffset-(winh/2);
}
else if (ns6){
	documentWidth=self.innerWidth/2+window.pageXOffset-(winw/2);
	documentHeight=self.innerHeight/2+window.pageYOffset-(winh/2);
}
popup.left = documentWidth+calculate;
popup.top = documentHeight+calculate;
setTimeout("displayElement()",100);
}
function centerElement(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function closeElement(){
	if (ie||ns6) { popup.display="none"; } 
	else { popup.visibility ="hide"; }
        if (repeat == 1) { location.replace; }
}

