﻿function emailTextAdd(em, status) {
    if (status == "focus") {
        if (em.value.toLowerCase() == "email address") em.value = "";
    } else {
        if (em.value == "") em.value = "Email Address";
    }
}

/* Top Menu Function */
function toggleMenu(menu, show) {
    var ulChild = menu.getElementsByTagName('ul');
    //alert(ulChild[0]);
    if (show == 1) {
        ulChild[0].style.visibility = "visible";
    } else {
    
        ulChild[0].style.visibility = "hidden";
    }
}

/* VIBE sorting function */
function vibeSort(sel, link) {
    var index = sel.options[sel.selectedIndex].value;
    //alert (index + link);
    SetCookie('sortopt', index);
    Vibe_AjaxRequest(link + "?Filter=[Sort=" + index + "*ava=0]");
    return false;
}
function setImageURL2(url, pos)
{
        document.getElementById('popupImageURL').value = url;
        var p = pos.split('_');
        var image = document.getElementById('divProductPic' + p[1]).getElementsByTagName('img');

        image[0].src = url.replace('icon', 'medium'); 
}

function popupImage(obj) {
    var day = new Date();
    var id = day.getTime();
    var newImg = new Image();
    newImg.src = obj.src;
    var height = newImg.height;
    var width = newImg.width;
    window.open(obj.src, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=' + width + ',height=' + height);
}

function showFlamHelper() {
    document.getElementById("FlamHelper").style.display = "block";
}
function hideFlamHelper() {
    document.getElementById("FlamHelper").style.display = "none";
}
