
//Preload search icon
var search_icon_off = new Image(); 
search_icon_off.src = "site_search_icon_off.gif";

//Check the search engine form before submitting
function CheckForm1() {

	//Check for a word to search
	if (document.frmSiteSearch.search.value==""){
		alert("Please enter at least one keyword to search");
		document.frmSiteSearch.search.focus();

	}
	else
	{
		   document.frmSiteSearch.action = '../site_search.asp';
		   document.frmSiteSearch.submit();	
	}
}

// check the mailing list form before submitting

function checkemail()
{
var testresults=false
var str=document.form1.email.value
var filter=/^(\w+(?:\.\w+)*)@(\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
var filter2=/^(\w+(?:\.\w+)*)@(\w[\w-]{0,66})\.(\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;

if (filter.test(str) || filter2.test(str))
testresults=true
else{
	testresults=false
}
return (testresults)
}

function checkbae()
{
if (document.layers||document.getElementById||document.all)
return checkmail()
else
return true
}
function checkform() {
	if ((document.form1.email.value==""))



	{
	   	   alert ("Please fill in your e-mail address to subscribe.");
	}
	else
	{
		if (checkemail())
	 	{

		   document.form1.action = '../feedbackform_send.asp';
		   document.form1.submit();
		}
		else
			alert ("Please fill in a valid e-mail address.");
   	}
}


//Disable right-click function

am = "Copyright of Solitaire Media Pte Ltd";

bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

