function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function openWindow(){
	//alert("opening new window");
	window.open('shop_changecurrency.aspx','imgWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=no,width=550,height=450,maximize=null,top=90,left=180")
}
function submitForm(){
	//alert("submitting");
	document.form.submit();
}
function showDetails(strProductName,strProductPrice,strCurrency){
	ProductDetails.style.visibility = "visible";
	//NoDetails.style.visibility = "hidden";
	document.getElementById("ProductName").innerHTML = strProductName
	document.getElementById("ProductPriceCopy").innerHTML = "Price:&nbsp;"
	document.getElementById("ProductPrice").innerHTML = strCurrency + " " + strProductPrice
}
function showDefault(){
	/*NoDetails.style.visibility = "visible";
	ProductDetails.style.visibility = "hidden";*/
	document.getElementById("ProductName").innerHTML = "Click on images for enlarged view and details"
	document.getElementById("ProductPrice").innerHTML = ""
	document.getElementById("ProductPriceCopy").innerHTML = ""
		
	
}          
function showPopup(intProductId){
	window.open('../shoponline/shoponline_popup.aspx?pid=' + intProductId,'pWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=742,height=550,maximize=null,top=0,left=0");
}

function showColorName(ColorName){
	document.getElementById("ColorDetail").innerHTML = ColorName;
}
function highlightImage(ItemNo){
	document.getElementById(ItemNo).style.borderRight=" #ffffff 1px solid"
	document.getElementById(ItemNo).style.borderLeft=" #ffffff 1px solid"
	document.getElementById(ItemNo).style.borderBottom=" #ffffff 1px solid"
	document.getElementById(ItemNo).style.borderTop=" #ffffff 1px solid"
}
function removeHighlightImage(ItemNo){
	document.getElementById(ItemNo).style.borderRight=" #000000 1px solid"
	document.getElementById(ItemNo).style.borderLeft=" #000000 1px solid"
	document.getElementById(ItemNo).style.borderBottom=" #000000 1px solid"
	document.getElementById(ItemNo).style.borderTop=" #000000 1px solid"

}
function buyAnother(intProductId){
	window.parent.location = "shoponline_popup.aspx?pid=" + intProductId;
}
function continueShop(){
	window.parent.close();
}
function checkout(){
	window.parent.opener.location = "shop_shoppingcart.aspx";
	window.parent.close();
}
function gotoMyCollection(){
	window.parent.opener.location = "../Member/MyCollection.aspx";
	window.parent.close();
}
function showModifyUnit(){
	document.getElementById("ModifyUnit").style.visibility = "visible";
}
function showImageUnit(){
	document.getElementById("ModifyUnit").style.visibility = "hidden";
}
function showColors(ItemId,ProductId){
	window.open('shoponline_productcolors.aspx?itemid=' + ItemId + "&pid=" + ProductId,'cWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=no,width=350,height=354,maximize=null,top=0,left=0");
}
function showImage(ImageId,ProductId){
	window.open('shoponline_addimage.aspx?imgid=' + ImageId + "&pid=" + ProductId,'cWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=no,width=350,height=354,maximize=null,top=0,left=0");
}
function showColorDetail(ImageUrl,ColorName){
	document.getElementById("ColorImage").innerHTML = ImageUrl;
	document.getElementById("ColorName").innerHTML = ColorName;
}
function closeWindow(){
	window.parent.close();
}
function showWomensSizeChart(){
	window.open('shop_womenssizechart.aspx','cWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=762,height=530,maximize=null,top=0,left=0");
}
function showMensSizeChart(){
	window.open('shop_menssizechart.aspx','cWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=762,height=530,maximize=null,top=0,left=0");
}
function showTermsofsale(){
	window.open('TermsOfSale.aspx','cWin',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=670,height=520,maximize=null,top=0,left=0");
}
function sendToLogin(){
	window.parent.opener.location = "../member/member_enquirylogin.aspx";
	window.parent.close();
}
function sendToRegister(){
	window.parent.opener.location = "../member/registration.aspx";
	window.parent.close();
}
function showMensMeasurementForm(ItemId,ProductId){
	//alert('custom item selected');
	window.open('mensmeasureform.aspx?itemid=' + ItemId + "&pid=" + ProductId,'',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=no,width=762,height=530,maximize=null,top=0,left=0")
}
function showWomensMeasurementForm(ItemId,ProductId){
	//alert('custom item selected');
	window.open('womensmeasureform.aspx?itemid=' + ItemId + "&pid=" + ProductId,'',"toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=762,height=530,maximize=null,top=0,left=0")
}
function confirmMeasurementAdd(ProductId){
	var strUrl ;
	strUrl = "shoponline_productdetails.aspx?pid=" + ProductId + "&add=success"
	window.parent.opener.location = strUrl
}
function showType(ProductId)
{
var id = ProductId;
//alert(id);
document.getElementById(id).style.visibility = "visible";
}
function hideType(ProductId)
{
var id = ProductId;
document.getElementById(id).style.visibility = "hidden";
}

