 // JavaScript Document

//function fnorderserch(str) - Need not to remove from the pages

//Function to open pop up window

//Code For Home PAge
<!-- start www.hitslink.com/ statistics web tools hit counter code -->
<script type="text/javascript" id="wa_u"></script>
<script type="text/javascript">//<![CDATA[
wa_account="mgarami5"; wa_location=212;
wa_pageName=location.pathname;  // you can customize the page name here
document.cookie='__support_check=1';wa_hp='http';
wa_rf=document.referrer;wa_sr=window.location.search;
wa_tz=new Date();if(location.href.substr(0,6).toLowerCase()=='https:')
wa_hp='https';wa_data='&an='+escape(navigator.appName)+ 
'&sr='+escape(wa_sr)+'&ck='+document.cookie.length+
'&rf='+escape(wa_rf)+'&sl='+escape(navigator.systemLanguage)+
'&av='+escape(navigator.appVersion)+'&l='+escape(navigator.language)+
'&pf='+escape(navigator.platform)+'&pg='+escape(wa_pageName);
wa_data=wa_data+'&cd='+
screen.colorDepth+'&rs='+escape(screen.width+ ' x '+screen.height)+
'&tz='+wa_tz.getTimezoneOffset()+'&je='+ navigator.javaEnabled();
wa_img=new Image();wa_img.src=wa_hp+'://counter.hitslink.com/statistics.asp'+
'?v=1&s='+wa_location+'&acct='+wa_account+wa_data+'&tks='+wa_tz.getTime();
document.getElementById('wa_u').src=wa_hp+'://counter.hitslink.com/track.js'; //]]>
</script>
<!-- End www.hitslink.com/ statistics web tools hit counter code -->


//Code For Home Page

function openWin(theURL,winName,features)
	{
	window.open(theURL,winName,features);
	}

//Updated function
function validateCount1(objForm,pagesize)
	{
	var selectedRecs = pagesize;
	var numpages = Math.ceil(NUM_RECORDS / selectedRecs);
	var pageNo =  document.myform1.page1.value;//objForm.page1.value;
	return checkForPageNumber(pageNo,numpages,selectedRecs);
	}
//Updated function	
function validateCount2(objForm,pagesize)
	{
	var selectedRecs = pagesize;
	var numpages = Math.ceil(NUM_RECORDS / selectedRecs);
	var pageNo =  objForm.page2.value;
	return checkForPageNumber(pageNo,numpages,selectedRecs);
	}
	
function checkForPageNumber(pageNo,numpages,selectedRecs)
{
var retValue = true;
//var pageNo =  stripWhitespace(pageNo);
if(pageNo =='')
	{
		msg = "_______________________________________________________\n\n";
		msg += "	Please enter a valid page number.\n";
		msg += "______________________________________________________\n\n";
		alert(msg);
//		objForm.page.focus();
		retValue = false;
	}
if(isNaN(pageNo))
{
		msg = "_______________________________________________________\n\n";
		msg += "	You did not enter a valid page number.\n";
		msg += "______________________________________________________\n\n";
		alert(msg);
//		objForm.page.focus();
		retValue = false;
}
else
{
	if (parseInt(pageNo)>numpages || parseInt(pageNo) <= 0)
	{
//		alert("There are max "+ numpages+ " pages");
		msg = "_______________________________________________________________\n\n";
		msg += "	There are maximum "+ numpages+ " pages currently available"+"\n";
		msg += "	Please enter a page number less then or equal to "+ numpages+ "\n";
		msg += "______________________________________________________________\n\n";
		alert(msg);
//		objForm.page.focus();
		retValue = false;
	}
}
	return retValue;
}

//updated function
function show_image(name,product_id,base)
{
	//alert('hi');
	//base ="/images/upload_images/products/";
	 var temp ;
	 temp = eval("document.images."+ product_id );.
	 //alert('temp:' & temp);
	 temp.src =  base + name ;
}
//-----------------------------------------------------------------------------------------------------
function fnSubmit_platinium_fourprong()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#platinium_fourprong";
document.pendant_frm.submit();
}

function fnSubmit_18kwhitegold_fourprong()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#18kwhitegold_fourprong";
document.pendant_frm.submit();
}

function fnSubmit_18kyellowgold_fourprong()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#18kyellowgold_fourprong";
document.pendant_frm.submit();
}

function fnSubmit_platinium_princesscut()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#platinium_princesscut";
document.pendant_frm.submit();
}

function fnSubmit_18kwhitegold_princesscut()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#18kwhitegold_princesscut";
document.pendant_frm.submit();
}

function fnSubmit_18kyellowgold_princesscut()
{
document.pendant_frm.hidden1.value='ch'
document.pendant_frm.action="/necklaces-pendants/diamond-solitaire-pendants#18kyellowgold_princesscut";
document.pendant_frm.submit();
}
//----------------------------------------------------------------------------------------------
//----------------------------Earrings Diamond Stud---------------------------------------------
function fnSubmit_platiniumfourprong()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#platiniumfourprong";
document.earings_frm.submit();
}
/*function fnSubmit_18kwhitegold_fourprong()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#18kwhitegold_fourprong";
document.earings_frm.submit();
}
function fnSubmit_18kyellowgold_fourprong()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#18kyellowgold_fourprong";
document.earings_frm.submit();
}
function fnSubmit_platinium_princesscut()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#platinium_princesscut";
document.earings_frm.submit();
}
function fnSubmit_18kwhitegold_princesscut()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#18kwhitegold_princesscut";
document.earings_frm.submit();
}
function fnSubmit_18kyellowgold_princesscut()
{
document.earings_frm.hidden1.value='ch'
document.earings_frm.action="/diam-earrings-stud-details#18kyellowgold_princesscut";
document.earings_frm.submit();
}



*/

