function openDiv(divName,evt){
	//alert(evt.screenX+'=====DDDDDD======='+evt.screenY+'...............'+window.scrollY);
	$(divName).style.display = "block";
	//$(divName).style.top = $('footerLinkDiv').offsetTop+"px";
	//$(divName).style.left = $('footerLinkDiv').offsetLeft+"px";	
	$(divName).style.top = document.body.scrollTop+"px";
	$(divName).style.left = "20%";	

}
function addressPopUp(sclrfnum){
	var url = path+"/faces/tiles/components/checkout/billingShippingAddress.jsp?multiAddress=Y&cartId="+sclrfnum;
	window.open( url,'multiAddr','left=300,top=100,width=380,height=380');
}
function divShowHide(divName,act)
{
	if (act == "showit")
	{document.getElementById(divName).style.display = 'block';
			if(navigator.appName == "Microsoft Internet Explorer")
			{
				var divNode = document.getElementById(divName);
				divNode.insertAdjacentHTML("afterEnd", '<IFRAME frameBorder="10" scrolling="no" id="_hvrShm" name="_hvrShm" style="position:absolute; z-index:5; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); " />'); 
				var iframeShm = document.getElementById("_hvrShm");
				iframeShm.style.top = divNode.offsetTop; 
				iframeShm.style.left = divNode.offsetLeft; 
				iframeShm.style.width = divNode.offsetWidth; 
				iframeShm.style.height = divNode.offsetHeight;
			}
	}
	else if (act == "hideit")
	{
			
			document.getElementById(divName).style.display = 'none';
			if(document.getElementById('_hvrShm')!=null)
				while((el=document.getElementsByName('_hvrShm')).length!=0){el[0].parentNode.removeChild(el[0]);}
	}
}

function divShowitHideit(divId,act){
	if($(divId)!= null){
		$(divId).style.display = 'none';
		if (act == "show")
		{
			$(divId).style.display = 'block';
		}
		else if (act == "hide")
		{
			$(divId).style.display = 'none';
		}
	}
}

function checkLoginIdPwd(formId){
	var logId = document.forms[formId].elements['loginId'];
	var pwd = document.forms[formId].elements['password'];
	if(logId.value==''){
		alert('Please enter User Id.');
		logId.focus();
		return false;
	}else{
		var regEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)/i;
		if(!regEx.test(logId.value)){
			alert('Please enter valid mail Id.');
			return false;
		}
	}
	if(pwd.value==''){
		alert('Please enter Password.');
		pwd.focus();
		return false;
	}
	return true;
}


/*

function footerBottom() {
            var _height=document.body.scrollHeight;
            var _width=document.body.scrollWidth;
            var height = parseInt(_height);
            var width = parseInt(_width);
            var footer=document.getElementById('footerClass');

            if (screen.height == 768 && height < 610 && footer!= null)
            {
                        footer.className='left fullWidth footerClass';
            }
            
            else if (screen.height == 864 && height < 705 && footer!= null)
            {
                        footer.className='left fullWidth footerClass';
            }  
			else if (screen.height == 1024 && height < 750 && footer!= null)
			{
				footer.className='left fullWidth footerClass';
			} 
			else if (screen.height == 960 && height < 850 && footer!= null)
			{
				footer.className='left fullWidth footerClass';
			}
            else if (footer!= null)
            {
                        footer.className='left fullWidth';
            }

}*/

// writtn by rakesh starts

function footerBottom() {
	//alert("Hi..");
	var _height=document.body.scrollHeight;
	var _width=document.body.scrollWidth;
	var height = parseInt(_height);
	var width = parseInt(_width);
	//alert("Height --->> "+height);
	//alert("Width --->> "+width);
	//alert("Your resolution is "+screen.width+"x"+screen.height);
	
	var footer=document.getElementById('footerClass');
	var _bodyCont= document.getElementById('bodyContentDiv').offsetHeight;
	var bodyCont= parseInt(_bodyCont);
	//here actual header hiehgt + footer hieght =311   86+143=229
	
	//alert(bodyCont);
	
	if (screen.height == 1024 && bodyCont < 621 && footer!= null)
	{
		//alert("1024 and 621");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 960 && bodyCont < 559 && footer!= null)
	{
		//alert("960 and 559");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 800 && bodyCont < 399 && footer!= null)
	{
		//alert("800 and 399");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 720 && bodyCont < 319 && footer!= null)
	{
		//alert("720 and 319");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 864 && bodyCont < 443 && footer!= null)
	{
		//alert("864 and 443");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 612 && bodyCont < 191 && footer!= null)
	{
		//alert("612 and 191");
		footer.className='left fullWidth footerClass';
	}

	else if (screen.height == 768 && bodyCont < 289 && footer!= null)
	{
		//alert("768 and 289");
		footer.className='left fullWidth footerClass';
	}


/*
	if (screen.height == 768 && height < 610 && footer!= null){
		//alert("Inside 768");
		footer.className='Fleft fullWidth footerClass';
	}


	else if (screen.height == 612 && height < 450 && footer!= null){
		//alert("Inside else if 612");
		footer.className='Fleft fullWidth footerClass';
	}
	
	else if (screen.height == 720 && height < 560 && footer!= null){
		//alert("Inside else if 720");
		footer.className='Fleft fullWidth footerClass';
	}
	
	else if (screen.height == 800 && height < 640 && footer!= null){
		//alert("Inside else if 800");
		footer.className='Fleft fullWidth footerClass';
	}
	
	else if (screen.height == 864 && height < 705 && footer!= null){
		//alert("Inside else if 864");
		footer.className='Fleft fullWidth footerClass';
	}


	else if (screen.height == 960 && height < 800 && footer!= null){
		//alert("Inside else if 960");
		footer.className='Fleft fullWidth footerClass';
	}	
	
	
	else if (screen.height == 1024 && height < 865 && footer!= null){
		//alert("Inside else if 1024");
		footer.className='Fleft fullWidth footerClass';
	}*/
	

	else if (footer!= null){
		//alert("Inside else");
		footer.className='Fleft fullWidth';
	} 

}
	// writtn by rakesh end