<!--

function fcInit() {
	//fcFlash(true, 'tdRightItem1');
}

// **************************************************************************
// New window
// **************************************************************************
var strWindowURL;
var numWindowWidth;
var numWindowHeight;

function fcWindow(strWindowURL, numWindowWidth, numWindowHeight) {
	newWindow = window.open(strWindowURL,'','toolbar=no,status=no,resizable,menubar=no,WIDTH='+numWindowWidth+',HEIGHT='+numWindowHeight);
	if (newWindow.opener == null) newWindow.opener = self; 
}

// **************************************************************************
// Flashing right menu 
// **************************************************************************
var blnFlash;
var strFlashID;

function fcFlash(blnFlash, strFlashID) {

	if (blnFlash == false) {
		document.all[strFlashID].className = 'rightItemFooterLeft';	
		window.setTimeout("fcFlash(true, '"+strFlashID+"')", 1000);
	} else {
		document.all[strFlashID].className = 'rightItemFooterLeftSelected';
		window.setTimeout("fcFlash(false, '"+strFlashID+"')", 1000);
	}
		
}

// **************************************************************************
// Main functions
// **************************************************************************
var objField;
var strClearText;

function fnFieldClear(objField, strClearText) {
	if (objField) {
		if (objField.value == strClearText) {
			objField.value = '';
		}
	}
}

// **************************************************************************
// Frontpage functions
// **************************************************************************
function fcMidPartFlash() {
	
	/*var ShockMode = 0;
	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
		if (navigator.plugins && navigator.plugins["Shockwave Flash"]) {
			ShockMode = 1;
		}
	}
	
	if ( ShockMode ) {

	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){*/
		MM_showHideLayers('dMidFlash','','show');
	/*}*/
	
}

// **************************************************************************
// Layer functions
// **************************************************************************
function MM_findObj(n, d) { //v4.01
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
	
function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v;
	}
}

function checkscript()
{
		var namestr = document.getElementById('firstname').value;
		namestr = namestr.toLowerCase();
		if (namestr.indexOf('http://') > -1 )
		{
			alert('Please enter your name correctly');
			return false;
		}else if (document.getElementById('emailaddress').value != '' )
		{
			return CyJS_Utils_IsEmailValidcf (document.getElementById('emailaddress').value);
		} 
}



function CyJS_Utils_IsEmailValidcf(checkThisEmail)
{
	var myEMailIsValid = true;
	var myAtSymbolAt = checkThisEmail.indexOf('@');
	var myLastDotAt = checkThisEmail.lastIndexOf('.');
	var mySpaceAt = checkThisEmail.indexOf(' ');
	var myLength = checkThisEmail.length;


	// at least one @ must be present and not before position 2
	// @yellow.com : NOT valid
	// x@yellow.com : VALID

	if (myAtSymbolAt < 1 )
 		{myEMailIsValid = false}


	// at least one . (dot) afer the @ is required
	// x@yellow : NOT valid
	// x.y@yellow : NOT valid
	// x@yellow.org : VALID

	if (myLastDotAt < myAtSymbolAt)
	 {myEMailIsValid = false}

	// at least two characters [com, uk, fr, ...] must occur after the last . (dot)
	// x.y@yellow. : NOT valid
	// x.y@yellow.a : NOT valid
	// x.y@yellow.ca : VALID

	if (myLength - myLastDotAt <= 2)
	 {myEMailIsValid = false}


	// no empty space " " is permitted (one may trim the email)
	// x.y@yell ow.com : NOT valid

	if (mySpaceAt != -1)
	 {myEMailIsValid = false}


	if (myEMailIsValid == true)
	 {
		
		return true
			 
	}
	else
	 {alert("Please check that your email address is entered correctly")
	 return false;}

}

//-->