
function popWindow(name,url,obj) {
  switch ( name ) {
	case "sendmail":
     var NewWindow = window.open("http://www.fs-business.com/GlobalFiles/SendMail.asp?url="+url+"&subject="+obj, "sendmail", "width=400,height=370,resizable,scrollbars");
	  break;
	case "print":
     var NewWindow = window.open("Print.asp?id="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	case "printEvent":
     var NewWindow = window.open("PrintEvent.asp?id="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	case "printProduct":
     var NewWindow = window.open("../PrintProduct.asp?MemberItemCode="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	case "printProductTable":
     var NewWindow = window.open("../PrintProductTable.asp?Title="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	case "printProductView":
     var NewWindow = window.open("../PrintProductView.asp?Title="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	case "printBusiness":
     var NewWindow = window.open("../Print.asp?id="+obj+"&url="+url, "print", "width=600,height=350,left=130,top=110,status=no,scrollbars=yes,resizable=yes,toolbar=no");
	  break;
	}
	
  if(!NewWindow.opener) {
	 NewWindow.opener = self;
	 }	
	 NewWindow.focus();
}

function CheckSearch(TheForm)
{	
   if (TheForm.Keyword.value == "")
	{
		alert("You must enter keywords.");
		TheForm.Keyword.focus();
		return(false);
	}

  switch ( TheForm.Type.value ) {
	case "0":
	  document.AdvanceForm.action = "searchResults.asp";
	  document.AdvanceForm.method = "POST";
	  document.AdvanceForm.submit();
	  break;
	default:
	  document.AdvanceForm.action = "searchResultsType.asp";
	  document.AdvanceForm.method = "POST";
	  document.AdvanceForm.submit();
	  break;
	}

 return(true);		
}

function CheckSearchTop(TheForm)
{	
   if (TheForm.Keyword.value == "")
	{
		alert("You must enter keywords.");
		TheForm.Keyword.focus();
		return(false);
	}

/*
   if (TheForm.searchOption[1].checked == true){
	 document.searchForm.method = "POST";
	 document.searchForm.action = "searchEventResults.asp";
	 document.searchForm.submit();
	}else{
	 document.searchForm.method = "POST";
	 document.searchForm.action = "searchResults.asp";
	 document.searchForm.submit();
	 }
*/	
    return(true);		
}

function CheckEmail(TheForm)
{	
   if (TheForm.email.value == "")
	{
		alert("You must enter Email.");
		TheForm.email.focus();
		return(false);
	}
 return(true);		
}

x="http://www.fs-business.com/fs-world/"
//x="http://orot/fs-world/"

function Contact(url){
  window.open(x + "contact.asp?Page="+url);
}

// function to change background colour of leftmenu
function bg(obj,col) {
	//obj.style.backgroundColor = col;
	switch ( col ) {
		case 0:
			obj.style.backgroundColor = '#EEEEED'; //'#E07D29';
			break;
		case 1:
			obj.style.backgroundColor = '#ffffff';
			break;
		case 2:
			obj.style.backgroundColor = '#ffffff';
			break;
		}
}



// Get the date
function getDate(){
	var today = new Date();
	var day = today.getDay();
	var dday = today.getDate();
	var mon = today.getMonth();
	var year = today.getFullYear();
	var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
	var mons = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var outStr = days[day] + ' ' + mons[mon] + ' ' + dday + ', ' + year;
	return outStr;
}
