/* Show popup screen javaScipt start */
function showtest(divId,divId1,iframeId){
var showDiv = document.getElementById(divId);
var showDiv1 = document.getElementById(divId1);
var showIframe = document.getElementById(iframeId);
showDiv.style.visibility = "visible";
showDiv.style.display = "block";
showDiv1.style.visibility = "visible";
showDiv1.style.display = "block";
showIframe.style.visibility = "visible";
showIframe.style.display = "block";
showDiv.style.height = document.body.scrollHeight;
showDiv.style.width = document.body.scrollWidth;
showIframe.style.height = document.body.scrollHeight;
showIframe.style.width = document.body.scrollWidth;
}
function hidetest(divId,divId1,iframeId){
var showDiv = document.getElementById(divId);
var showDiv1 = document.getElementById(divId1);
var showIframe = document.getElementById(iframeId);
showDiv.style.visibility = "hidden";
showDiv.style.display = "none";
showDiv1.style.visibility = "hidden";
showDiv1.style.display = "none";
showIframe.style.visibility = "hidden";
showIframe.style.display = "none";
showDiv.style.height = document.body.scrollHeight;
showDiv.style.width = document.body.scrollWidth;
showIframe.style.height = document.body.scrollHeight;
showIframe.style.width = document.body.scrollWidth;
}
/* -- scroll Div Fanction start -- */
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
var px = document.layers ? "" : "px";
window[id + "_obj"] = el;
if(d.layers)el.style=el;
el.cx = el.sx = sx;el.cy = el.sy = sy;
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

el.floatIt=function()
{
var pX, pY;
pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
document.documentElement && document.documentElement.clientWidth ? 
document.documentElement.clientWidth : document.body.clientWidth;
pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
document.documentElement.scrollTop : document.body.scrollTop;
if(this.sy<0) 
pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
document.documentElement.clientHeight : document.body.clientHeight;
this.cx += (pX + this.sx - this.cx)/10;this.cy += (pY + this.sy - this.cy)/10;
this.sP(this.cx, this.cy);
setTimeout(this.id + "_obj.floatIt()", 0);
}
return el;
}
//JSFX_FloatDiv("LoginDiv", 10,10).floatIt();
//JSFX_FloatDiv("ProductDiv", 10,10).floatIt();
//JSFX_FloatDiv("ShippingAddressDiv", 10,10).floatIt();
//JSFX_FloatDiv("ProductDiv", 10,10).floatIt();
//JSFX_FloatDiv("GiftMessageDiv", 10,10).floatIt();
//JSFX_FloatDiv("AddaNewAddressDiv", 10,10).floatIt();
/* -- scroll Div Fanction End -- */

/* Show popup screen javaScipt End */

/* FNP Site Div JavaScript Fancation start */
function divShowitHideit(divName,act){
document.getElementById(divName).style.display = 'none';
if (act == "show")
{
document.getElementById(divName).style.display = 'block';
}
else if (act == "hide")
{
document.getElementById(divName).style.display = 'none';
}
}
function PreloadImages(){
 imgUp = new Image();
 imgUp.src = 'images/minus.gif';
 imgDown = new Image();
 imgDown.src = 'images/plus.gif'; 
}
function toggleMenu(getMenu,getenuImage){
PreloadImages();
getMenu.style.display = (getMenu.style.display=="none") ? "" : "none";
if (getMenu.style.display == "none") {
getenuImage.src=imgDown.src;
}
else {
getenuImage.src=imgUp.src;
}
}
function checkLogin(obj){
var element = document.getElementById("EmailID");
var element1 = document.getElementById("Password");
if(element.value.length !=0 && element.value==element1.value)
 {
hidetest('myFrame','LoginDiv','iframe');divShowitHideit('indexlogin','hide');divShowitHideit('indexlogout','show');
 }
 else
{
alert('Please Enter Valid EmailId.');
}
}
function GuestcheckLogin(obj){
var element = document.getElementById("GuestEmailID");
var element1 = document.getElementById("GuestPassword");
if(element.value.length !=0 && element.value==element1.value)
 {
hidetest('myFrame','GuestLoginDiv','iframe');javascript:location.href='shoppingCart.html';
 }
 else
{
alert('Please Enter Valid EmailId.');
}
}
/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title,url,"");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} 
else if(document.all)// ie
window.external.AddFavorite(url,title);
}
/* FNP Site Div JavaScript Fancation End */

/* FNP Site Add & Remove Item row Fancation start  */
function addRow(){
var _table = document.getElementById('itemListTable').insertRow(0);
var cell0 = _table.insertCell(0);
var cell1 = _table.insertCell(1);
cell0.innerHTML = 'New Cell1';
cell1.innerHTML = 'New Cell2';
}
function removeRow(row){
var i=row.parentNode.parentNode.rowIndex;
document.getElementById('itemListTable').deleteRow(i);
}


function showresult(obj) {
	if (hideElems.indexOf(obj) > -1)
	lastMenu = obj;
	hideAll(obj);
	document.getElementById(obj).style.display = 'block'
}
function hideAll(){
	for (i=0; i<hideArr.length; i++){
	if (lastMenu != hideArr[i]){
	hide(hideArr[i]);
	}
	}
}
function hide(obj){
	document.getElementById(obj).style.display = 'none';
}
/* FNP Site Add & Remove Item row Fancation End */

