﻿// Java Script File

function barInfo_AfterItemSelected(oListbar, oItem, oEvent)
{
	if (oItem.txt== "Postage Charges")
    {
        w = window.open('Forms/frmDeliveryCharges.aspx',null,'width=715,height=600,scrollbars=2,toolbar=yes,resizable=yes,location=top');
	    if (w) 
	    {
	        w.focus();
	        return true;
	    }
	}
}

function CheckUser()
{
    if(document.getElementById("txtEmail").value=="")
    {
        alert("Please enter a username");
        document.getElementById("txtEmail").focus();
        return false;
    }
    else if(document.getElementById("txtPassword").value=="")
    {
        alert("Please enter a password");
        document.getElementById("txtPassword").focus();
        return false;
    }
    else
    {
        return true;
    }
    
}


        function ZoomMoreClick(obj)
         {
            str=obj.src;
            var iLen = str.length;
            if(str.substring(iLen - 10) == "ZoomIn.png")
            {
                str = str.replace('ZoomIn.png','ZoomOut.png');
                obj.src= str;
                obj.title='Click to Zoom Out';
            }
            else
            {
                str = str.replace('ZoomOut.png','ZoomIn.png');
                obj.src= str;
                obj.title='Click to Zoom In';                
            }
            src1=document.getElementById("imgMain").src;
            document.getElementById("imgMain").src=document.getElementById("imgMain").alt;
            document.getElementById("imgMain").alt=src1;       
        }
        
        
        function ValidateUSS()
        {
            if(document.getElementById("ctl00_cphMiddleMasterData_chk").checked)
                return true;
            else
            {
                alert("Please tick the checkbox to unsubscribe");
                return false;
            }
        }
        
            function PRpopup(url)
    {
    	w = window.open(url,null,'width=700,height=500,scrollbars=2,toolbar=no,resizable=yes,location=top');
		if (w) 
		{
		    w.focus();
		}
	}
	
