function validateProfile()
{
	var firstname = window.document.editprofile.firstname.value;
	var lastname = window.document.editprofile.lastname.value;
	var bmon = window.document.editprofile.bmon.value;
	var byear = window.document.editprofile.byear.value;
	var bday = window.document.editprofile.bday.value;
	var address = window.document.editprofile.address.value;
	var city = window.document.editprofile.city.value;
	var country = window.document.editprofile.country.value;
	var state = window.document.editprofile.state.value;
	var zip = window.document.editprofile.zip.value;
	var phone = window.document.editprofile.phone.value;
	
	var myRegxp = /[0-9]/;
	var myRegxpPhone = /[A-Za-z]/;
	if(firstname == "")
	{
		alert(" First Name can't be Blank");
		window.document.editprofile.firstname.focus();
		return false;
	}
	if(lastname == "")
	{
		alert("Last Name can't be Blank");
		window.document.editprofile.lastname.focus();
		return false;
	}
	if(bmon == "" || byear =="" || bday == "")
	{
		alert("Please Enter Date of Birth");
		window.document.editprofile.bmon.focus();
		return false;
	}
	if(address == "")
	{
		alert("Address can't be Blank");
		window.document.editprofile.address.focus();
		return false;
	}
	if(city == "")
	{
		alert("City can't be Blank");
		window.document.editprofile.city.focus();
		return false;
	}
	if(country == "")
	{
		alert("Country can't be Blank");
		window.document.editprofile.country.focus();
		return false;
	}
	if(state == "")
	{
		alert("State can't be Blank");
		window.document.editprofile.state.focus();
		return false;
	}
	if(zip == "")
	{
		alert("Zip/Postal Code can't be Blank");
		window.document.editprofile.firstname.focus();
		return false;
	}
	if(phone == "")
	{
		alert("Phone can't be Blank");
		window.document.editprofile.phone.focus();
		return false;
	}
	

	
	if(myRegxp.test(document.editprofile.firstname.value))
	{
		alert("First name cannot contain a numerical 0-9 value.");
		return false;
	}
	if(myRegxp.test(document.editprofile.lastname.value))
	{
		alert("Last name cannot contain a numerical 0-9 value.");
		return false;
	}
	if(myRegxpPhone.test(document.editprofile.phone.value))
	{
		alert("Telephone number must be a numerical 0-9 value.");
		return false;
	}
}

	function CheckUsername(username)
	{
		// This function we will use to check to see if a username is taken or not.
		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{
			// If it cannot create a new Xmlhttp object.
			alert ("Browser does not support HTTP Request") // Alert Them!
			return // Returns.
		}
		// End If.
		var url = "/checkuser.php?username=" + username // Url that we will use to check the username.
		xmlHttp.open("GET", url, true) // Opens the URL using GET
		xmlHttp.onreadystatechange = function () 
		{
			// This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
			if (xmlHttp.readyState == 4) 
			{
				// If the onreadystatechange is equal to 4 lets show the response text.
				document.getElementById("checkalias").innerHTML = xmlHttp.responseText;
				// Updates the div with the response text from check.php
			}
			// End If.
		};
		// Close Function
		xmlHttp.send(null);
		// Sends NULL instead of sending data.
	}
	//Validate Email --START
	function CheckEmail(email_address)
	{
		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{
			// If it cannot create a new Xmlhttp object.
			alert ("Browser does not support HTTP Request") // Alert Them!
			return // Returns.
		}
		// End If.
		var url = "/checkuser.php?email_address=" + email_address // Url that we will use to check the username.
		xmlHttp.open("GET", url, true) // Opens the URL using GET
		xmlHttp.onreadystatechange = function () 
		{
			// This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
			if (xmlHttp.readyState == 4) 
			{
				// If the onreadystatechange is equal to 4 lets show the response text.
				document.getElementById("checkEmail").innerHTML = xmlHttp.responseText;
				// Updates the div with the response text from check.php
			}
			// End If.
		};
		// Close Function
		xmlHttp.send(null);
		// Sends NULL instead of sending data.
	}
	//Validate Email -- END
function CheckPasswd(password)
	{
		
		var xmlHttp;
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{
			// If it cannot create a new Xmlhttp object.
			alert ("Browser does not support HTTP Request") // Alert Them!
			return // Returns.
		}
		// End If.
		var url = "/checkuser.php?password=" + password // Url that we will use to check the username.
		xmlHttp.open("GET", url, true) // Opens the URL using GET
		xmlHttp.onreadystatechange = function () 
		{
			// This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
			if (xmlHttp.readyState == 4) 
			{
				// If the onreadystatechange is equal to 4 lets show the response text.
				document.getElementById("checkPasswd").innerHTML = xmlHttp.responseText;
				// Updates the div with the response text from check.php
			}
			// End If.
		};
		// Close Function
		xmlHttp.send(null);
		// Sends NULL instead of sending data.
	}
	function CheckPasswdMatch(confirm_password,password)
	{
		//alert(password);
		var xmlHttp;
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlHttp=new XMLHttpRequest();
		}
		else if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		else if (xmlHttp == null)
		{
			// If it cannot create a new Xmlhttp object.
			alert ("Browser does not support HTTP Request") // Alert Them!
			return // Returns.
		}
		// End If.
		var url = "/checkuser.php?password="+password+"&confirm_password="+confirm_password // Url that we will use to check the username.
		xmlHttp.open("GET", url, true) // Opens the URL using GET
		xmlHttp.onreadystatechange = function () 
		{
			// This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done.
			if (xmlHttp.readyState == 4) 
			{
				// If the onreadystatechange is equal to 4 lets show the response text.
				document.getElementById("CheckPasswdMatch").innerHTML = xmlHttp.responseText;
				// Updates the div with the response text from check.php
			}
			// End If.
		};
		// Close Function
		xmlHttp.send(null);
		// Sends NULL instead of sending data.
	}
//Scripts/AC_RunActiveContent.js

//v1.0

//Copyright 2006 Adobe Systems, Inc. All rights reserved.

function AC_AddExtension(src, ext)

{

  if (src.indexOf('?') != -1)

    return src.replace(/\?/, ext+'?'); 

  else

    return src + ext;

}



function AC_Generateobj(objAttrs, params, embedAttrs) 

{ 

  var str = '<object ';

  for (var i in objAttrs)

    str += i + '="' + objAttrs[i] + '" ';

  str += '>';

  for (var i in params)

    str += '<param name="' + i + '" value="' + params[i] + '" /> ';

  str += '<embed ';

  for (var i in embedAttrs)

    str += i + '="' + embedAttrs[i] + '" ';

  str += ' ></embed></object>';



  document.write(str);

}



function AC_FL_RunContent(){

  var ret = 

    AC_GetArgs

    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

     , "application/x-shockwave-flash"

    );

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}



function AC_SW_RunContent(){

  var ret = 

    AC_GetArgs

    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"

     , null

    );

  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);

}



function AC_GetArgs(args, ext, srcParamName, classid, mimeType){

  var ret = new Object();

  ret.embedAttrs = new Object();

  ret.params = new Object();

  ret.objAttrs = new Object();

  for (var i=0; i < args.length; i=i+2){

    var currArg = args[i].toLowerCase();    



    switch (currArg){	

      case "classid":

        break;

      case "pluginspage":

        ret.embedAttrs[args[i]] = args[i+1];

        break;

      case "src":

      case "movie":	

        args[i+1] = AC_AddExtension(args[i+1], ext);

        ret.embedAttrs["src"] = args[i+1];

        ret.params[srcParamName] = args[i+1];

        break;

      case "onafterupdate":

      case "onbeforeupdate":

      case "onblur":

      case "oncellchange":

      case "onclick":

      case "ondblClick":

      case "ondrag":

      case "ondragend":

      case "ondragenter":

      case "ondragleave":

      case "ondragover":

      case "ondrop":

      case "onfinish":

      case "onfocus":

      case "onhelp":

      case "onmousedown":

      case "onmouseup":

      case "onmouseover":

      case "onmousemove":

      case "onmouseout":

      case "onkeypress":

      case "onkeydown":

      case "onkeyup":

      case "onload":

      case "onlosecapture":

      case "onpropertychange":

      case "onreadystatechange":

      case "onrowsdelete":

      case "onrowenter":

      case "onrowexit":

      case "onrowsinserted":

      case "onstart":

      case "onscroll":

      case "onbeforeeditfocus":

      case "onactivate":

      case "onbeforedeactivate":

      case "ondeactivate":

      case "type":

      case "codebase":

        ret.objAttrs[args[i]] = args[i+1];

        break;

      case "width":

      case "height":

      case "align":

      case "vspace": 

      case "hspace":

      case "class":

      case "title":

      case "accesskey":

      case "name":

      case "id":

      case "tabindex":

        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];

        break;

      default:

        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];

    }

  }

  ret.objAttrs["classid"] = classid;

  if (mimeType) ret.embedAttrs["type"] = mimeType;

  return ret;

}


//images/css/validation.js

//*************** Validate Password ***************//
function validatePwd() 
{
	var invalid = " "; // Invalid character is a space
	var minLength = 6; // Minimum length
	var ctp = document.myForm.currentpasswd.value;
	var pw1 = document.myForm.newpasswd1.value;
	var pw2 = document.myForm.newpasswd2.value;

	if(ctp == '') 
	{
		alert('Enter your Current Password');
	    window.document.myForm.currentpasswd.focus();
		return false;
	}
	// Check for a Value in Both Fields.
	if (pw1 == '' || pw2 == '') 
	{
		alert('Please enter a new password in both the fields.');
		return false;
	}
	// Check for Minimum Length
	if (document.myForm.newpasswd1.value.length < minLength) 
	{
		alert('Your password must be at least ' + minLength + ' characters long. Please Try again.');
		return false;
	}
	// Check for Spaces
	if (document.myForm.newpasswd1.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please re-enter again.");
		return false;
	}
	else 
	{
		if (pw1 != pw2) 
		{
			alert ("You did not enter the same new password in both the fields. Please Try again.");
			return false;
		}
	}
}


//*************** Validate Registration ***************//
function register_val(register) 
{
	var als = window.document.register.alias.value;
	var pwd = window.document.register.passwd.value;
	var invalid = " "; // Invalid character is a space
	var minLength = 6; // Minimum length
	
	if(als == "")
	{
		alert("Please enter an Alias.");
		window.document.register.alias.focus();
		return false;
	}
	if(als.length < 4)
	{
			alert('Alias must be at least  4 characters long. Please Try again.');
			window.document.register.alias.focus();
			return false;
	}
	if(pwd == "")
	{
		alert("Please enter your Password.");
		window.document.register.passwd.focus();
		return false;
	}
	
	if (document.register.passwd.value.length < minLength) 
	{
		alert('Your password must be at least ' + minLength + ' characters long. Please Try again.');
		window.document.register.passwd.select();
		return false;
	}
	
	if (document.register.passwd.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please re-enter again.");
		window.document.register.passwd.select();
		return false;
	}
	
	var e1 = document.register.email.value;
	var e2 = document.register.verifyemail.value;
	if (e1 == '' || e2 == '') 
	{
		alert('Please enter your email in both the fields.');
		window.document.register.email.focus();
		return false;
	}
	if (e1 != e2) 
	{
		alert('Your email address in both the fields donot match. Please try again.');
		window.document.register.verifyemail.focus();
		return false;
	}
		
	var testresults;
	var str=window.document.register.email.value;
	var iChars = "!#$%^&*()+=[]\\\';,/{}|\":<>?";

	for (var i = 0; i < str.length; i++) {
  	if (iChars.indexOf(str.charAt(i)) != -1) {
  	alert ("Your email has special characters. \nThese are not allowed.\n Please remove them and try again.");
  	return false;
  	}
	}
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
		
	if (filter.test(str))
	{
		testresults=true;
	}else {
		alert("Please input a valid email address!")
		window.document.register.email.select();
		testresults=false;
	}
	return (testresults);
}


//*************** Validate Email ***************//
function checkEmail(myForm) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailid.value))
	{
		return (true)
	}
	alert("Invalid E-mail Address! Please re-enter.")
	return (false)
}


//*************** Process Logout ***************//
function logout()
{	
	var name=confirm("Are you sure you to want Logout ?")
	if (name==true)
	{
		window.location.href="/logout.php";
	}
	else 
	{
		
	}
}


//*************** Validate Login Form ***************//
function validate(formCheck) 
{
	var invalid = " ";	
	if(formCheck.login.value=="Username here..." || formCheck.login.value==""){
		alert("Please enter User Name");
		formCheck.login.value = "";
		formCheck.login.select();
		return false;
	}
	if(formCheck.passwd.value=="Password here..." || formCheck.passwd.value==""){
		alert("Please enter Your Password");
		formCheck.passwd.value = "";
		formCheck.passwd.select();
		return false;
	}
	/*if (formCheck.login.value.indexOf(invalid) > -1)
	{
		
		alert("Spaces are not allowed in Alias. Please enter again.");
		formCheck.login.select();		
		return false;
	}
	else*//* if(formCheck.passwd.value.indexOf(invalid) > -1) 
	{
		alert("Spaces are not allowed as Password. Please enter again.");
		formCheck.passwd.select();
		return false;
	}*/
}


//*************** Validate Deposits ***************//
function validate_deposit(mainform) 
{
	var amount = window.document.mainform.amount.value;
	if (amount=='') 
	{
		alert('Please enter an amount to Deposit');
		window.document.mainform.amount.select();
		return false;
	}
	else if(amount <=0)
	{
		alert('The amount you have entered is invalid, Please re-enter again.');
		window.document.mainform.amount.select();
		return false;
	}
	else if(amount >1000)
	{
		alert('You cannot deposit more than 1000 per transaction.');
		window.document.mainform.amount.select();
		return false;
	}
}


//*************** Return to Status Page from POS ***************//
function openBlankWindow(trackid, paymenttype)
{
	window.open('','POS', 'width=700, height=600, left=200, top=40, scrollbars=yes, toolbar=no, status=yes, resizable=no');
	parent.location.href=paymenttype+'/status.php?trackid='+trackid;
	return true;
}


//*************** Display Bingo Timer ***************//
function init()
{
	setTimeout('refreshTimer()', 1000);
}

function refreshTimer()
{
	var streams = document.getElementById("streams");
	var timers = document.getElementById("streams").value ;

	var i=1 ;
	for ( i=1 ; i < timers ;i++)
	{
		time = document.getElementById("time"+i);
		seconds = time.value ;
		seconds = seconds - 1 ; 
		time.value=seconds ;
		message = document.getElementById("message"+i);
		if ( seconds < 1 ) 
			message.innerHTML="Started" ;
		else
		{
			min = (seconds - seconds % 60) / 60 ; 
			sec = seconds%60 ;
			if ( sec < 10 ) 
				str = min+":0"+sec ;
			else
				str = min+":"+sec ; 
			message.innerHTML = str ;
		}

	}
	setTimeout('refreshTimer()', 1000); 
}


//*************** Open POPUP Window ***************//
function MM_openBrWindow(theURL,winName,features) 
{ 

	newwindow = window.open(theURL,winName,features);
	if(window.focus){
		newwindow.focus();	
	}
}


//*************** Getting Started ***************//
function newImage(arg) {
	
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


//*********************** Validate LPS ***********************//
function minimum_deposit() {
	var amount = document.cashier.amount.value;
	if (amount < 10) {
		alert("Minimum deposit amount is \u00A310");
		window.document.cashier.amount.focus();
		return false;
	}
	if (isNaN(amount)) {
		alert("Minimum deposit amount is \u00A310");
		window.document.cashier.amount.focus();
		return false;
	}	
}

function changeImages() 
{
	
	if (document.images && (preloadFlag == true)) 
	{
		for (var i=0; i<changeImages.arguments.length; i+=2) 
		{
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

//*************** Username Password Text box hints for login .php***************//


var HintClass = "hintTextbox";
var HintActiveClass = "hintTextboxActive";

// define a custom method on the string class to trim leading and training spaces
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); };

function initHintTextboxes() {
  var inputs = document.getElementsByTagName('input');
  for (i=0; i<inputs.length; i++) {
    var input = inputs[i];
  
    if (input.className.indexOf(HintClass)!=-1) {
      input.hintText = input.value;
      input.className = HintClass;
      input.onfocus = onHintTextboxFocus;
      input.onblur = onHintTextboxBlur;
    }
  }
}

function onHintTextboxFocus() {
  var input = this;
  if (input.value.trim()==input.hintText) {
    input.value = "";
    input.className = HintActiveClass;
  }
}

function onHintTextboxBlur() {
  var input = this;
  if (input.value.trim().length==0) {
    input.value = input.hintText;
    input.className = HintClass;
  }

}
window.onload = initHintTextboxes;

//images/css/script.js

function MM_preloadImages() { //v3.0

	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_swapImgRestore() { //v3.0

	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



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_swapImage() { //v3.0

	var i,j=0,x,a=MM_swapImage.arguments; 

		document.MM_sr=new Array; 

	for(i=0;i<(a.length-2);i+=3)

	if ((x=MM_findObj(a[i]))!=null){

	   document.MM_sr[j++]=x; 

	   if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];

	}

}



function MM_openBrWindow(theURL,winName,features) 

{ 

	//v2.0

	//theURL = "'" + theURL + "'";

	//winName = "'" + winName + "'";

	//features = "'" + features + "'";

  	window.open(theURL,winName,features);

}

function openBonusGame() {

 	var url = "game_cupid.php";

	newwindow = window.open(url,'CupidBonusGame','height=590, width=674, left=0, top=0, resizable=yes, scrollbars=no, toolbar=no, menubar=no');

}


//images/css/popupbox.js



var ns4=document.layers

var ie4=document.all

var ns6=document.getElementById&&!document.all



//drag drop function for NS 4////

/////////////////////////////////



var dragswitch=0

var nsx

var nsy

var nstemp



function drag_dropns(name){

if (!ns4)

return

temp=eval(name)

temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)

temp.onmousedown=gons

temp.onmousemove=dragns

temp.onmouseup=stopns

}



function gons(e){

temp.captureEvents(Event.MOUSEMOVE)

nsx=e.x

nsy=e.y

}

function dragns(e){

if (dragswitch==1){

temp.moveBy(e.x-nsx,e.y-nsy)

return false

}

}



function stopns(){

temp.releaseEvents(Event.MOUSEMOVE)

}



//drag drop function for ie4+ and NS6////

/////////////////////////////////





function drag_drop(e){

if (ie4&&dragapproved){

crossobj.style.left=tempx+event.clientX-offsetx

crossobj.style.top=tempy+event.clientY-offsety

return false

}

else if (ns6&&dragapproved){

crossobj.style.left=tempx+e.clientX-offsetx+"px"

crossobj.style.top=tempy+e.clientY-offsety+"px"

return false

}

}



function initializedrag(e){

crossobj=ns6? document.getElementById("showimage") : document.all.showimage

var firedobj=ns6? e.target : event.srcElement

var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"

while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){

firedobj=ns6? firedobj.parentNode : firedobj.parentElement

}



if (firedobj.id=="dragbar"){

offsetx=ie4? event.clientX : e.clientX

offsety=ie4? event.clientY : e.clientY



tempx=parseInt(crossobj.style.left)

tempy=parseInt(crossobj.style.top)



dragapproved=true

document.onmousemove=drag_drop

}

}

document.onmouseup=new Function("dragapproved=false")



////drag drop functions end here//////



function hidebox(){
document.getElementById('showimage').style.display='none';
}


//images/css/ClickShowHideMenu.js

function ClickShowHideMenu(id, clicked_menu) {

	show_menu = id+"-"+(clicked_menu-1);

	this.box1Hover = true;

    this.box2Hover = true;

    this.highlightActive = false;

    this.menu_id = 1;

    this.init = function () {

        if (!document.getElementById(this.id)) {

            //alert("Element '" + this.id + "' does not exist in this document. ClickShowHideMenu cannot be initialized");

			alert("Unable to load Java Script. Please check your browser settings and refresh the page.");

            return;

        }

        this.parse(document.getElementById(this.id).childNodes, this.tree, this.id, this.menu_id);

        this.load();

        if (window.attachEvent) {

            window.attachEvent("onunload", function (e) {

                self.save();

            }

            );

        }

        else if (window.addEventListener) {

            window.addEventListener("unload", function (e) {

                self.save();

            }

            , false);

        }

    }

    this.parse = function (nodes, tree, id) {

        for (var i = 0; i < nodes.length; i++) {

            if (nodes[i].nodeType != 1) {

                continue;

            }

            if (nodes[i].className) {

                if ("box1" == nodes[i].className.substr(0, 4)) {

                    nodes[i].id = id + "-" + tree.length;

                    tree[tree.length] =  new Array();

                    eval('nodes[i].onmouseover = function() { self.box1over("' + nodes[i].id + '"); }');

                    eval('nodes[i].onmouseout = function() { self.box1out("' + nodes[i].id + '"); }');

                    eval('nodes[i].onclick = function() { self.box1click("' + nodes[i].id + '"); }');

                }

                if ("section" == nodes[i].className) {

                    id = id + "-" + (tree.length - 1);

                    nodes[i].id = id + "-section";

                    tree = tree[tree.length - 1];

                }

                if ("box2" == nodes[i].className.substr(0, 4)) {

                    nodes[i].id = id + "-" + tree.length;

                    tree[tree.length] =  new Array();

                    eval('nodes[i].onmouseover = function() { self.box2over("' + nodes[i].id + '", "' + nodes[i].className + '"); }');

                    eval('nodes[i].onmouseout = function() { self.box2out("' + nodes[i].id + '", "' + nodes[i].className + '"); }');

                }

            }

            if (this.highlightActive && nodes[i].tagName && nodes[i].tagName == "A") {

                if (document.location.href == nodes[i].href) {

                    nodes[i].className = (nodes[i].className ? ' active' : 'active');

                }

            }

            if (nodes[i].childNodes) {

                this.parse(nodes[i].childNodes, tree, id);

            }

        }

    }

    this.box1over = function (id) {

        if (!this.box1Hover)return;

        if (!document.getElementById(id))return;

        document.getElementById(id).className = (this.id_openbox == id ? "box1-open-hover" : "box1-hover");

    }

    this.box1out = function (id) {

        if (!this.box1Hover)return;

        if (!document.getElementById(id))return;

        document.getElementById(id).className = (this.id_openbox == id ? "box1-open" : "box1");

    }

    this.box1click = function (id) {

        if (!document.getElementById(id)) {

            return;

        }

        var id_openbox = this.id_openbox;

        if (this.id_openbox) {

            if (!document.getElementById(id + "-section")) {

                return;

            }

            this.hide();

            if (id_openbox == id) {

                if (this.box1hover) {

                    document.getElementById(id_openbox).className = "box1-hover";

                }

                else {

                    document.getElementById(id_openbox).className = "box1";

                }

            }

            else {

                document.getElementById(id_openbox).className = "box1";

            }

        }

        if (id_openbox != id) {

            this.show(id);

            var className = document.getElementById(id).className;

            if ("box1-hover" == className) {

                document.getElementById(id).className = "box1-open-hover";

            }

            if ("box1" == className) {

                document.getElementById(id).className = "box1-open";

            }

        }

    }

    this.box2over = function (id, className) {

        if (!this.box2Hover)return;

        if (!document.getElementById(id))return;

        document.getElementById(id).className = className + "-hover";

    }

    this.box2out = function (id, className) {

        if (!this.box2Hover)return;

        if (!document.getElementById(id))return;

        document.getElementById(id).className = className;

    }

    this.show = function (show_menu) {

        if (document.getElementById(show_menu + "-section")) {

			document.getElementById(show_menu + "-section").style.display = "block";

            this.id_openbox = show_menu;

        }

    }

    this.hide = function () {

        document.getElementById(this.id_openbox + "-section").style.display = "none";

        this.id_openbox = "";

    }

    this.save = function () {

        if (this.id_openbox) {

            this.cookie.set(this.id, this.id_openbox);

        }

        else {

            // this.cookie.del(this.id);

        }

    }

    this.load = function () {

		//var id_openbox = this.cookie.get(this.id);

        var id_openbox = show_menu;

		if (id_openbox) {

            this.show(id_openbox);

            document.getElementById(id_openbox).className = "box1-open";

        }

    }

    function Cookie() {

        this.get = function (name) {

            var cookies = document.cookie.split(";");

            for (var i = 0; i < cookies.length; i++) {

                var a = cookies[i].split("=");

                if (a.length == 2) {

                    a[0] = a[0].trim();

                    a[1] = a[1].trim();

                    if (a[0] == name) {

                        return unescape(a[1]);

                    }

                }

            }

            return "";

        }

        this.set = function (name, value) {

            document.cookie = name + "=" + escape(value);

        }

        this.del = function (name) {

            document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT";

        }

    }

    var self = this;

    this.id = id;

    this.tree =  new Array();

    this.cookie =  new Cookie();

    this.id_openbox = "";

}

if (typeof String.prototype.trim == "undefined") {

    String.prototype.trim = function () {

        var s = this.replace(/^\s*/, "");

        return s.replace(/\s*$/, "");

    }

}

//images/css/ajaxtabs.js

//Change Log:

//* Updated: July 11th, 07: Fixed bug with persistence not working. Doh.

//* Updated: July 9th, 07: Added session only persistence to tabs (set "enabletabpersistence" var below). Only .js file changed.

//* Updated Nov 8th, 06. Ability to select a tab dynamically, by calling a method (ie: via a link). Only .js file changed.



var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)

var loadstatustext="<img src='/images/loading.gif' /> Requesting content..."

var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered (1=yes, 0=no)?



////NO NEED TO EDIT BELOW////////////////////////

var loadedobjects=""

var defaultcontentarray=new Object()

var bustcacheparameter=""



function ajaxpage(url, containerid, targetobj){

var page_request = false

if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc

page_request = new XMLHttpRequest()

else if (window.ActiveXObject){ // if IE

try {

page_request = new ActiveXObject("Msxml2.XMLHTTP")

} 

catch (e){

try{

page_request = new ActiveXObject("Microsoft.XMLHTTP")

}

catch (e){}

}

}

else

return false

var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")

for (var i=0; i<ullist.length; i++)

ullist[i].className=""  //deselect all tabs

targetobj.parentNode.className="selected"  //highlight currently clicked on tab

if (url.indexOf("#default")!=-1){ //if simply show default content within container (verus fetch it via ajax)

document.getElementById(containerid).innerHTML=defaultcontentarray[containerid]

return

}

document.getElementById(containerid).innerHTML=loadstatustext

page_request.onreadystatechange=function(){

loadpage(page_request, containerid)

}

if (bustcachevar) //if bust caching of external page

bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()

page_request.open('GET', url+bustcacheparameter, true)

page_request.send(null)

}



function loadpage(page_request, containerid){

if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))

document.getElementById(containerid).innerHTML=page_request.responseText

}



function loadobjs(revattribute){

if (revattribute!=null && revattribute!=""){ //if "rev" attribute is defined (load external .js or .css files)

var objectlist=revattribute.split(/\s*,\s*/) //split the files and store as array

for (var i=0; i<objectlist.length; i++){

var file=objectlist[i]

var fileref=""

if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding

if (file.indexOf(".js")!=-1){ //If object is a js file

fileref=document.createElement('script')

fileref.setAttribute("type","text/javascript");

fileref.setAttribute("src", file);

}

else if (file.indexOf(".css")!=-1){ //If object is a css file

fileref=document.createElement("link")

fileref.setAttribute("rel", "stylesheet");

fileref.setAttribute("type", "text/css");

fileref.setAttribute("href", file);

}

}

if (fileref!=""){

document.getElementsByTagName("head").item(0).appendChild(fileref)

loadedobjects+=file+" " //Remember this object as being already added to page

}

}

}

}



function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)

var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]

if (thetab.getAttribute("rel")){

ajaxpage(thetab.getAttribute("href"), thetab.getAttribute("rel"), thetab)

loadobjs(thetab.getAttribute("rev"))

}

}



function savedefaultcontent(contentid){// save default ajax tab content

if (typeof defaultcontentarray[contentid]=="undefined") //if default content hasn't already been saved

defaultcontentarray[contentid]=document.getElementById(contentid).innerHTML

}



function startajaxtabs(){

for (var i=0; i<arguments.length; i++){ //loop through passed UL ids

var ulobj=document.getElementById(arguments[i])

var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL

var persisttabindex=(enabletabpersistence==1)? parseInt(getCookie(arguments[i])) : "" //get index of persisted tab (if applicable)

var isvalidpersist=(persisttabindex<ulist.length)? true : false //check if persisted tab index falls within range of defined tabs

for (var x=0; x<ulist.length; x++){ //loop through each LI element

var ulistlink=ulist[x].getElementsByTagName("a")[0]

ulistlink.index=x

if (ulistlink.getAttribute("rel")){

var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")

ulistlink.setAttribute("href", modifiedurl) //replace URL's root domain with dynamic root domain, for ajax security sake

savedefaultcontent(ulistlink.getAttribute("rel")) //save default ajax tab content

ulistlink.onclick=function(){

ajaxpage(this.getAttribute("href"), this.getAttribute("rel"), this)

loadobjs(this.getAttribute("rev"))

saveselectedtabindex(this.parentNode.parentNode.id, this.index)

return false

}

if ((enabletabpersistence==1 && persisttabindex<ulist.length && x==persisttabindex) || (enabletabpersistence==0 && ulist[x].className=="selected")){

ajaxpage(ulistlink.getAttribute("href"), ulistlink.getAttribute("rel"), ulistlink) //auto load currenly selected tab content

loadobjs(ulistlink.getAttribute("rev")) //auto load any accompanying .js and .css files

}

}

}

}

}



////////////Persistence related functions//////////////////////////



function saveselectedtabindex(ulid, index){ //remember currently selected tab (based on order relative to other tabs)

if (enabletabpersistence==1) //if persistence feature turned on

setCookie(ulid, index)

}



function getCookie(Name){ 

var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair

if (document.cookie.match(re)) //if cookie found

//return document.cookie.match(re)[0].split("=")[1] //return its value  ::commented by shakeer ::

return ""

}



function setCookie(name, value){

document.cookie = name+"="+value //cookie value is domain wide (path=/)

}

//images/css/form-field-tooltip_new.js

function addLoadEvent(func) {

  var oldonload = window.onload;

  if (typeof window.onload != 'function') {

    window.onload = func;

  } else {

    window.onload = function() {

      oldonload();

      func();

    }

  }

}



function prepareInputsForHints() {

	var inputs = document.getElementsByTagName("input");

	for (var i=0; i<inputs.length; i++){

		// test to see if the hint span exists first

		if (inputs[i].parentNode.getElementsByTagName("span")[0]) {

			// the span exists!  on focus, show the hint

			inputs[i].onfocus = function () {

				this.parentNode.getElementsByTagName("span")[0].style.display = "inline";

			}

			// when the cursor moves away from the field, hide the hint

			inputs[i].onblur = function () {

				this.parentNode.getElementsByTagName("span")[0].style.display = "none";

			}

		}

	}

	// repeat the same tests as above for selects

	var selects = document.getElementsByTagName("select");

	for (var k=0; k<selects.length; k++){

		if (selects[k].parentNode.getElementsByTagName("span")[0]) {

			selects[k].onfocus = function () {

				this.parentNode.getElementsByTagName("span")[0].style.display = "inline";

			}

			selects[k].onblur = function () {

				this.parentNode.getElementsByTagName("span")[0].style.display = "none";

			}

		}

	}

}

addLoadEvent(prepareInputsForHints);

/*Begin - Trust logo code*/
var Ovr2='';if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}"}else{cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}"}if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){cot_t1_DOCtp2="_top:expression(document.documentElement.scrollTop-20+document.documentElement.clientHeight-this.clientHeight);}"}else{cot_t1_DOCtp2="_top:expression(document.body.scrollTop-20+document.body.clientHeight-this.clientHeight);}"}var cot_bgf0=(window.location.protocol.toLowerCase()=="https:")?"https://secure.comodo.net/trustlogo/images/cot_bgf0.gif":"http://www.trustlogo.com/images/cot_bgf0.gif";var cot_tl_bodyCSS='* html {background:url('+cot_bgf0+') fixed;background-repeat: repeat;background-position: right bottom;}';var cot_tl_fixedCSS='#cot_tl_fixed{position:fixed;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'_position:absolute;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'bottom:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'right:0px;';var cot_tl_fixedCSS=cot_tl_fixedCSS+'clip:rect(0 100 85 0);';var cot_tl_fixedCSS=cot_tl_fixedCSS+cot_t1_DOCtp;var cot_tl_popCSS='#cot_tl_pop {background-color: transparent;';var cot_tl_popCSS=cot_tl_popCSS+'position:fixed;';var cot_tl_popCSS=cot_tl_popCSS+'_position:absolute;';var cot_tl_popCSS=cot_tl_popCSS+'height:194px;';var cot_tl_popCSS=cot_tl_popCSS+'width: 244px;';var cot_tl_popCSS=cot_tl_popCSS+'right: 120px;';var cot_tl_popCSS=cot_tl_popCSS+'bottom: 20px;';var cot_tl_popCSS=cot_tl_popCSS+'overflow: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'visibility: hidden;';var cot_tl_popCSS=cot_tl_popCSS+'z-index: 100;';var cot_tl_popCSS=cot_tl_popCSS+cot_t1_DOCtp2;document.write('<style type="text/css">'+cot_tl_bodyCSS+cot_tl_fixedCSS+cot_tl_popCSS+'</style>');function cot_tl_bigPopup(url){newwindow=window.open(url,'name','WIDTH=450,HEIGHT=500,FRAMEBORDER=0,MARGINWIDTH=0,MARGINHEIGHT=0,SCROLLING=no,allowtransparency=true');if(window.focus){newwindow.focus()}return false}function cot_tl_toggleMiniPOPUP_hide(){var cred_id='cot_tl_pop';var NNtype='hidden';var IEtype='hidden';var WC3type='hidden';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"")}else{if(document.layers){document.layers[cred_id].visibility=NNtype}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"")}}}}function cot_tl_toggleMiniPOPUP_show(){cred_id='cot_tl_pop';var NNtype='show';var IEtype='visible';var WC3type='visible';if(document.getElementById){eval("document.getElementById(cred_id).style.visibility=\""+WC3type+"\"")}else{if(document.layers){document.layers[cred_id].visibility=NNtype}else{if(document.all){eval("document.all."+cred_id+".style.visibility=\""+IEtype+"\"")}}}}function COT(cot_tl_theLogo,cot_tl_LogoType,LogoPosition,theAffiliate){if(document.getElementById('comodoTL')){document.getElementById('comodoTL').style.display="none"}host=location.host;if(window.location.protocol.toLowerCase()=="https:"){var cot_tl_miniBaseURL='https://secure.comodo.net/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';var cot_tl_bigBaseURL='https://secure.comodo.net/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5'}else{var cot_tl_miniBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=C&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5';var cot_tl_bigBaseURL='http://www.trustlogo.com/ttb_searcher/trustlogo?v_querytype=W&v_shortname='+cot_tl_LogoType+'&v_search='+host+'&x=6&y=5'};document.write('<div id="cot_tl_fixed">');document.write('<a href="http://www.instantssl.com" onClick="return cot_tl_bigPopup(\''+cot_tl_bigBaseURL+'\')"><img src='+cot_tl_theLogo+' alt="SSL Certificate" border="0"></a>');document.write('</div>')}
/*End - Trust logo code*/