﻿function openForm(strURL) {
    window.open(strURL, 'strWindowTitle', 'width=300,height=400,resizable=no,toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,top=20,left=20,');
}

function openPrint(strURL) {
    window.open(strURL, 'strWindowTitle', 'width=600,height=400,resizable=no,toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no,top=20,left=20,');
}

function openDemo(strURL) {
    window.open(strURL, 'strWindowTitle', 'width=600,height=374,resizable=no,toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,top=20,left=20,');
}
function openGenDemo(strURL) {
    window.open(strURL, 'strWindowTitle', 'width=768,height=557,resizable=no,toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,top=20,left=20,');
}
if (document.images) { // Preloaded images
    hero1 = new Image();
    hero1.src = "../static/images/hero_education.jpg";

    hero2 = new Image();
    hero2.src = "../static/images/hero_entertainment.jpg";

    hero3 = new Image();
    hero3.src = "../static/images/hero_business.jpg";
}

function timeimgs(numb) { // Reusable timer
    thetimer = setTimeout("imgturn('" + numb + "')", 3000);
}

function imgturn(numb) { // Reusable image turner
if (document.images) {

    if (numb == "3") { // This will loop the image
        document["hero"].src = eval("hero3.src");
        timeimgs('1');
    }

    else {
        document["hero"].src = eval("hero" + numb + ".src");

        timeimgs(numb = ++numb);
    }
}
}

function expandProdInfo(image, divId) { // Expand Product Info
    if (image.src.indexOf("expand") > -1) {
        image.src = "../static/images/arrow_collapse.gif";
        if (navigator.appName.indexOf("Microsoft") > -1) {
            document.getElementById(divId).style.display = "block";
        }
        else {
            document.getElementById(divId).style.display = "table-row";
        }
    }

    else {
        image.src = "../static/images/arrow_expand.gif";
        document.getElementById(divId).style.display = "none";
    }
}

function ChangeImage(leftImageId, leftImage, rightImageId, rightImage, middleColumnId, middleColumnClass) { // Locate Retailer Button Rollovers
    document.getElementById(leftImageId).src = "static/images/" + leftImage;
    document.getElementById(rightImageId).src = "static/images/" + rightImage;
    document.getElementById(middleColumnId).className = middleColumnClass;
}