function GoSearch(i)
{
	switch (i)
	{
		case '0':	var strMess;
					strMess= "";
					if ((document.thisForm.skeyword.value).length<3){strMess += "\nPlease enter a search Keyword.";}
					if(strMess == "")
					{
						document.thisForm.action = "category.asp?type=search";
						document.thisForm.method = "post";
						document.thisForm.submit();
					}
					else
					{
						alert("The input error occured \n\n" + strMess);
					}
					break;
		case '1':	var strMess;
					strMess= "";
					if ((document.thisForm.scategory[document.thisForm.scategory.selectedIndex].value)==""){strMess += "\nPlease select the Category to search.";}
					if(strMess == "")
					{
						//document.thisForm.action = "category.asp?catid="+document.thisForm.scategory[document.thisForm.scategory.selectedIndex].value;
						document.thisForm.action = "category.asp?catid="+document.thisForm.scategory[document.thisForm.scategory.selectedIndex].value;
						document.thisForm.method = "post";
						document.thisForm.submit();
					}
					else
					{
						alert("The input error occured \n\n" + strMess);
					}
					break;
		default:	break;
	}
}
function GoReg()
{
	document.thisForm.action="https://ssl.linksynergy.com/php-bin/affiliate/registration/register.shtml";
	document.thisForm.method="post";
	document.thisForm.Submit();
}

var tID = 0;
var startTime  = null;

var timeout=15*(60*1000) + 0*1000; // 15:00 minutes, as milliseconsd

function UpdateTimer() {
  if(tID) {
     clearTimeout(tID);
  }
  var date = new Date();
  var diff = date.getTime() - startTime.getTime();
  if (diff >= timeout) {
    focus();
    alert(
    "Warning: Your session will expire in five minutes unless you do one of the following:\nSubmit a form.\nClick to a new page.\n\nYou might loose all form data if your session expires.");
  } else {
    tID = setTimeout("UpdateTimer()", 1000);
  }
}
function Start() {
   startTime   = new Date();
   tID  = setTimeout("UpdateTimer()", 1000);
}
function goSend()
{
	document.thisForm.action="/includes/signup.asp?action=sendemail";
	document.thisForm.method="post";
	document.thisForm.submit();
}
function doUnload()
{
	if ((window.event.clientX < 0) && (window.event.clientY < 0))
	{
	//	alert("HI");
		window.open("survey.asp","florist","width=400,height=500,top=20,left=200,titlebar=0,scrollbars=1");
	}
}
/*	if (event.clientY < 0) {
      //event.returnValue = 'Are you sure you want to leave the page?';
	  window.open("survey.asp","florist","width=400,height=500,top=20,left=200,titlebar=0,scrollbars=1");
   }
*/
