﻿// JScript File

function MorphOverHome(img)
{
    //$(img).morph({height: 150, width: 150});
    //$(img).src='images/'+img+'T.jpg';
    $(img).width="150";
    $(img).height="150";
}

function MorphOutHome(img)
{
    //$(img).src='images/'+img+'.gif';
    //$(img).morph({height: 125, width: 125});
    $(img).width="125";
    $(img).height="125";
}

function ProductDetail(img,relElem)
{
    //$(img).morph({height: 600, width: 600});
    //$(img).style.display='none';
    //$(img).src='images/'+img+'.jpg';
    //$(img).width="400";
    var pos = $(relElem).getPosition();
    document.getElementById('divImgWidget').style.top = pos.y;
    document.getElementById('divImgWidget').style.left = pos.x-75;
    document.getElementById('divImgWidget').style.display = 'block';
    document.getElementById("imgWidgetImage").src= img;
}
function ProductDetailClose()
{
     document.getElementById('divImgWidget').style.display = 'none';
}



function showMenu(current,container)
{
    var s="";
    s+="<table border='0' cellpadding=0 cellspacing='0'>";
    s+="<tr>";
    
    s+=MenuItem("MEN","MEN","default.htm",current);
    s+=MenuItem("WOMEN","WOMEN","women.htm",current);
    s+=MenuItem("KIDS","KIDS","kids.htm",current);
    
    s+="<tr>";
    
    s+="<tr>";
    
    s+=MenuItemSelect("MEN",current);
    s+=MenuItemSelect("WOMEN",current);
    s+=MenuItemSelect("KIDS",current);
    
    s+="<tr>";
    
    
    s+="</table>";

    document.getElementById(container).innerHTML = s;
}

function MenuItem(tag,text,page,current)
{
    var item="";
    if(tag==current)
    {
        item+="<td class='menuItemSelected' onclick='location.href=\""+page+"\"'>";
    }
    else
    {
        item+="<td class='menuItem' onclick='location.href=\""+page+"\"'>";
    }
    item+=text;
    item+="</td>";
    return item;
}

function MenuItemSelect(tag,current)
{
    var item="";
    item+="<td class='menuItemTab' valign='bottom' >";
    if(tag==current)
    {
        item+="<img src='images/tab.jpg'>";
    }
    item+="</td>";
    return item;
}