
window.onload = function()
{
checkLogin();

document.getElementById("cbCheck").checked=false;
document.getElementById("Bust").value = "";
document.getElementById("Waist").value = "";
document.getElementById("Hips").value = "";
document.getElementById("HollowtoHem").value = "";
document.getElementById("OtherItem").value = "Shoulder To Shoulder:\nNipple to Nipple:\nShoulder To Nipple:\nShoulder To Waist:\nWaist To Hem (No Shoes):\nFull Length (No Shoes):\nHeight of Your Shoes:\nHow tall you are (not shoes):";
}

function selectSize()
{
var check = document.getElementById("cbCheck").checked;
if(check)
{
document.getElementById("CustomSize").style.display = "block";
document.getElementById("Size").disabled = true;
document.getElementById("Size").selectedIndex = 0;
}
else
{
document.getElementById("CustomSize").style.display = "none";
document.getElementById("Size").disabled = false;
}
}

function inputItem()
{
if(document.getElementById("Color").value == null || document.getElementById("Color").value == "")
{
window.alert("Please select Color!");
document.getElementById("Color").focus();
return false;
}

if(!document.getElementById("cbCheck").checked)
{
if(document.getElementById("Size").value == null || document.getElementById("Size").value == "")
{
window.alert("Please select Size!");
document.getElementById("Size").focus();
return false;
}
}
else
{
if(document.getElementById("Bust").value == null || document.getElementById("Bust").value == "")
{
window.alert("Please input Bust Size!");
document.getElementById("Bust").focus();
return false;
}
if(document.getElementById("Waist").value == null || document.getElementById("Waist").value == "")
{
window.alert("Please input Waist Size!");
document.getElementById("Waist").focus();
return false;
}
if(document.getElementById("Hips").value == null || document.getElementById("Hips").value == "")
{
window.alert("Please input Hips Size!");
document.getElementById("Hips").focus();
return false;
}
if(document.getElementById("HollowtoHem").value == null || document.getElementById("HollowtoHem").value == "")
{
window.alert("Please input Hollow to Hem Size!");
document.getElementById("HollowtoHem").focus();
return false;
}
}

if(document.getElementById("Quantity").value == null || document.getElementById("Quantity").value == "")
{
window.alert("Please input Quantity!");
document.getElementById("Quantity").focus();
return false;
}

return true;
}

function addFavorite(url, title)
{
   if (document.all)
   {
      window.external.addFavorite(url, title);
   }
   else if (window.sidebar)
   {
      window.sidebar.addPanel(title, url, "");
   }
} 

