function writecookie()
{
	
	if (!Get_Cookie('cookie_status')){
	Set_Cookie('cookie_status','1', '1000', '/', '', '' );
	}
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );


if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

// this function gets the cookie, if it exists
function Get_Cookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}


function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}

/*---
if(document.images) {
pics = new Array(); 
pics[1] = new Image();
pics[1].src = "img/toplink_home.gif"; 
pics[2] = new Image();
pics[2].src = "img/toplink_home_o.gif";

pics[3] = new Image();
pics[3].src = "img/toplink_search.gif"; 
pics[4] = new Image();
pics[4].src = "img/toplink_search_o.gif";

pics[5] = new Image();
pics[5].src = "img/toplink_clients.gif"; 
pics[6] = new Image();
pics[6].src = "img/toplink_clients_o.gif";

pics[7] = new Image();
pics[7].src = "img/toplink_contact.gif"; 
pics[8] = new Image();
pics[8].src = "img/toplink_contact_o.gif";
}
---*/

function changer(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}



var jobHideAbout;var jobHideWhat;var jobHideOur;var jobHideWhy;
var AppearStatus ="done";
var FadeStatus ="done";
var currentAppear = "none";
var TAB;
var showSubtotal = true;


function DHTMLSound(surl) {
  document.getElementById("dummyspan").innerHTML=
    "<embed src='"+surl+"' hidden=true autostart=true loop=false>";
}

function rollover(obj,contentID){
		
	switch(contentID){
		case "About":
				clearTimeout(jobHideAbout);
				obj.className="tab5hover";
				
		break
		case "What":
				clearTimeout(jobHideWhat);
				obj.className="tab6hover";
				
		break
		case "Our":
				clearTimeout(jobHideOur);
				obj.className="tab7hover";
				

		break
		case "Why":
				clearTimeout(jobHideWhy);
				obj.className="tab8hover";
				

		break
	}
	$(contentID).style.display ="block";
	//alert('1');
	try{
	$('flvlayer').style.visibility = "hidden";
	}
	catch(e){}
   //alert('2');
}

function swapTabMenu(obj,cName){
	obj.className=cName;
}

function rolloverTrend(contentID){

				tabID = "li"+contentID;
				if($(tabID).className !="subTabSelect"){
				$(tabID).className= "subTabHover";
				$(tabID).childNodes[0].className = "subTabHover";
				}

}

function rolloutTrend(contentID){

				tabID = "li"+contentID;
				if($(tabID).className !="subTabSelect"){
					$(tabID).className= "subTab";
					$(tabID).childNodes[0].className = "";
				}

}

function swapContent(contentNew,contentOld) {
	$('content'+contentNew).style.display = 'block';
	$('content'+contentOld).style.display = 'none';
	
	$('li'+contentOld).className = 'subTab';
	$('li'+contentNew).className = "subTabSelect";

	return false;
}
function swapContentHome(contentNew,contentOld){
$('content'+contentNew).style.display = 'block';
	$('content'+contentOld).style.display = 'none';
	
	$('li'+contentOld).className = 'subTab';
	$('li'+contentNew).className = "subTabSelect";
	
	$('li'+contentOld).childNodes[0].className = 'subTab';
	$('li'+contentNew).childNodes[0].className = "subTabSelect";
	return false;
}
function rollout(obj,contentID){
		switch(contentID){
		case "About":
				jobHideAbout = setTimeout("delayHideAbout()",100);
				if(window.name!="about"){
					obj.className="tab5";}else{
					obj.className="tab5selected";
					}
					
		break
		case "What":
				jobHideWhat = setTimeout("delayHideWhat()",100);
				if(window.name!="what"){
				obj.className="tab6";}else{
				obj.className="tab6selected";
				}
		break
		case "Our":
				jobHideOur = setTimeout("delayHideOur()",100);
				if(window.name!="our"){
				obj.className="tab7";}else{
				obj.className="tab7selected";
				}
		break
		case "Why":
				jobHideWhy = setTimeout("delayHideWhy()",100);
				if(window.name!="why"){
					obj.className="tab8";}else{
					obj.className="tab8selected";
					}
		break
		}
		//alert('aa');
		try{
		$('flvlayer').style.visibility = "visible";
		}
		catch(e){}
		//alert('bb');

}
function delayHideAbout(){
		//new Effect.Fade('About',{afterFinish:FadeFinish});
		$('About').style.display ="none";
}
function delayHideWhat(){
		//new Effect.Fade('What',{afterFinish:FadeFinish});
		$('What').style.display ="none";
}
function delayHideOur(){
		//new Effect.Fade('Our',{afterFinish:FadeFinish});
		$('Our').style.display ="none";
}
function delayHideWhy(){
		//new Effect.Fade('Why',{afterFinish:FadeFinish});
		$('Why').style.display ="none";
}

function FadeFinish(){
			var TABS = document.getElementsByClassName('mytab');
			var nodes = $A(TABS);
			nodes.each(function(node){
				if (node.id  != TAB)
				{
					//node.style.backgroundColor="#ffffff";
					//node.style.color="";
				}
			});
}

function Linkto(page){
	window.location ="index.php?page="+page;
}

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function flash_write(file, width, height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+file+'"><param name="wmode" value="transparent"><param name="quality" value="high"><embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" wmode="transparent"></embed></object>');
}

var soundfile="sound/rollover.wav";

function playsound(){
var agent = navigator.userAgent.toLowerCase();
	if (document.all && document.getElementById){
		document.getElementById("soundeffect").src=""; //reset first in case of problems
		document.getElementById("soundeffect").src=soundfile;
	}
}

function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}


hex=255 // Initial color value.

function fadetext(id){ 
  if(hex>0) { //If color is not black yet
    hex-=11; // increase color darkness
    $(id).style.color="rgb("+hex+","+hex+","+hex+")";
    setTimeout("fadetext()",20); 
  }
  else
    hex=333 //reset hex value
}


function showEffect(showSubtotal) {
	
	if(showSubtotal) {
		$('TotalSub').className = 'fade-ff9900';
		$('TotalBlended').className = 'fade-ff9900';
	}	
	$('TotalSubHybrid').className = 'fade-ff9900';
	$('TotalBlendedHybrid').className = 'fade-ff9900';
	$('Savings').className = 'fade-ff9900';
	$('SavingsPersent').className = 'fade-ff9900';
	wpOnload();	

	
}
function selectRow(obj){ 
	/*
	playsound();
	root = obj.parentNode;
	row = root.parentNode;
	row.className = "contentSelect";
	Tbody = $('calculatorTable').childNodes[0];
	eachRow = Tbody.childNodes;
	for (i=0;i<eachRow.length ;i++ )	{ 
		if (eachRow[i] != row && eachRow[i].className=="contentSelect" ){
			eachRow[i].className = "content";
		}
	}
	*/
}
function removeZero(str) {
	var txt ='';
	
	
	for(var i=0;i<str.length;i++) { 
		if(str.substring(i,i+1) != '0') {			
			return str.substring(i);			
		}
	}
	return str;
}

var gOldVal = 0;
function edit(obj){
	playsound();
	oldValue = obj.innerHTML;
	root = obj.parentNode;
	textField = root.childNodes[0];
	textField.style.display = "block";
	obj.style.display = "none";
	textField.value= removeCommars(oldValue);	
	gOldVal = removeCommars(removeZero(oldValue));
	textField.focus();
	selectRow(obj);
	return false;
}  

function updateHours(obj){
	
		playsound();
		if ((obj.value>=0)&&(obj.value!="")){
			root = obj.parentNode;
			text = root.childNodes[1];
			text.style.display = "block";
			
			text.innerHTML = addCommas(removeZero(obj.value));
			obj.style.display = "none";
			calulate(obj);
		}
		else{
			alert("Value must be number");
		}
		calulateSub();
		calulateSubHybrid();
		
		if(removeZero(gOldVal) != removeZero(obj.value)) {
			$('TotalHours').className = 'fade-ff9900';
			showEffect();

			setIndicator('6');
			$('titleScenario').innerHTML ="Custom";
		}
}

function editRates(obj){
	playsound();
	if (obj.innerHTML.charAt(0)=="$"){
		oldValue = obj.innerHTML.substring(1);
	}
	root = obj.parentNode;
	selectRow(obj);
	textField = root.childNodes[0];
	textField.style.display = "block";
	obj.style.display = "none";
	textField.value= removeCommars(oldValue);
	gOldVal = removeCommars(removeZero(oldValue));
	textField.focus();

} 

function updateRates(obj){
	root = obj.parentNode;
	text = root.childNodes[1];
	text.innerHTML = addCommas(obj.value);
	if (obj.value>=0 ){
		if (obj.value==""){
			alert("Value must be none empty");
			return false;
		}
		text.style.display = "block";
		if (text.innerHTML.charAt(0)!="$"){
			text.innerHTML = "$"+addCommas(removeZero(obj.value));
		}	
		//alert(root.id.charAt(0));
		if(root.id.charAt(0) =="D") {
			showSubtotal = false;
		}else{
			showSubtotal = true;
		}
		obj.style.display = "none";
		calulate(obj);
		calulateSub();
		calulateSubHybrid(); 

		if(removeZero(gOldVal) != removeZero(obj.value)) {
			showEffect();
			setIndicator('6');
			$('titleScenario').innerHTML ="Custom";
		}
	}
	else{
	alert("Value must be number");
	}
}



function calulateAll() {
	for (i=1;i<9 ;i++ )	{
		vA = removeCommars($('A'+i).childNodes[1].innerHTML);
		vB = removeCommars($('B'+i).childNodes[1].innerHTML.substring(1));
		$('C'+i).innerHTML = "$"+addCommas(parseInt(vA)*parseInt(vB));
		vD = removeCommars($('D'+i).childNodes[1].innerHTML.substring(1));
		$('E'+i).innerHTML = "$"+addCommas(parseInt(vA)*parseInt(vD));
	}
	calulatTotalHours();
	calulateSub();
	calulateSubHybrid();

}

function setIndicator(linkId){
	for (i=1;i<7 ;i++ )	{
		if(i != linkId) {
			$('clink'+i).className ="callink";
	    }else{
			$('clink'+i).className ="calSelect";
		}
	}
}


function calulatTotalHours(){
	//alert(parseInt(removeCommars($('Hours2').innerHTML))+parseInt(removeCommars($('Hours1').innerHTML)));
	sum_TotalHours =  parseInt(removeCommars($('Hours1').innerHTML))+parseInt(removeCommars($('Hours2').innerHTML))+parseInt(removeCommars($('Hours3').innerHTML))+parseInt(removeCommars($('Hours4').innerHTML))+parseInt(removeCommars($('Hours5').innerHTML))+parseInt(removeCommars($('Hours6').innerHTML))+parseInt(removeCommars($('Hours7').innerHTML))+parseInt(removeCommars($('Hours8').innerHTML));

	TotalHours_Commas = addCommas(sum_TotalHours);
	$('TotalHours').innerHTML = TotalHours_Commas;

}

function calulate(obj){
	root = obj.parentNode;
	row = root.id.substring(1);
	//alert("row="+row);
	hr = $('Hours'+row).innerHTML;
	textRates = $('rates'+row).innerHTML.substring(1);
	textHRates = $('Hrates'+row).innerHTML.substring(1);
	ratesResult = removeCommars(textRates)*removeCommars(hr);
	HratesResult = removeCommars(textHRates)*removeCommars(hr);

	if(showSubtotal){
		if(removeZero(gOldVal) != removeZero(obj.value)) {
			$('C'+row).className = 'fade-ff9900';
		}
		$('C'+row).innerHTML = '$'+addCommas(ratesResult);
	}
	if(removeZero(gOldVal) != removeZero(obj.value)) {
		$('E'+row).className = 'fade-ff9900';
	}
	$('E'+row).innerHTML = '$'+addCommas(HratesResult);
	calulatTotalHours();
}
///////////////////////////////////////////////////////////
var C1v,C2v,C3v,C4v,C5v,C6v,C7v,C8v,E1v,E2v,E3v,E4v,E5v,E6v,E7v,E8v;
var TotalValue;						// $('TotalSub').innerHTML
var TotalValueHybrid;				// $('TotalBlendedHybrid').innerHTML
var TotalHrs;							// $('TotalHours').innerHTML

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

function removeCommars(str){
	var arrStr = str.split(',');
	var number ='';
	for(var i=0;i<arrStr.length;i++) {
		number +=arrStr[i];
	}		
	return number;
}

function calulateSub(){
	C1v = removeCommars($('C1').innerHTML.substring(1));
	C2v = removeCommars($('C2').innerHTML.substring(1));
	C3v = removeCommars($('C3').innerHTML.substring(1));
	C4v = removeCommars($('C4').innerHTML.substring(1));
	C5v = removeCommars($('C5').innerHTML.substring(1));
	C6v = removeCommars($('C6').innerHTML.substring(1));
	C7v = removeCommars($('C7').innerHTML.substring(1));
	C8v = removeCommars($('C8').innerHTML.substring(1));
	
	TotalValue = parseInt(C1v)+parseInt(C2v)+parseInt(C3v)+parseInt(C4v)+parseInt(C5v)+parseInt(C6v)+parseInt(C7v)+parseInt(C8v);
	TotalValue_Commas = addCommas(TotalValue);
	$('TotalSub').innerHTML = "$"+TotalValue_Commas;


	TotalHrs = $('TotalHours').innerHTML;
	Subv = $('TotalSub').innerHTML.substring(1);
	if(removeCommars(TotalHrs) > 0) {		
		BlendedValue = parseInt(removeCommars(Subv))/ parseInt(removeCommars(TotalHrs));
		$('TotalBlended').innerHTML = "$"+addCommas(Math.round(BlendedValue));
	}else{
		$('TotalBlended').innerHTML = "$0";
	}
	
}

function calulateSubHybrid(){
	E1v = removeCommars($('E1').innerHTML.substring(1));
	E2v = removeCommars($('E2').innerHTML.substring(1));
	E3v = removeCommars($('E3').innerHTML.substring(1));
	E4v = removeCommars($('E4').innerHTML.substring(1));
	E5v = removeCommars($('E5').innerHTML.substring(1));
	E6v = removeCommars($('E6').innerHTML.substring(1));
	E7v = removeCommars($('E7').innerHTML.substring(1));
	E8v = removeCommars($('E8').innerHTML.substring(1));
	
	TotalValueHybrid = parseInt(E1v)+parseInt(E2v)+parseInt(E3v)+parseInt(E4v)+parseInt(E5v)+parseInt(E6v)+parseInt(E7v)+parseInt(E8v);
	TotalValueHybrid_Commas = addCommas(TotalValueHybrid);
	$('TotalSubHybrid').innerHTML = "$"+TotalValueHybrid_Commas;

	TotalHrs = removeCommars($('TotalHours').innerHTML);
	SubvHybrid = removeCommars($('TotalSubHybrid').innerHTML.substring(1));
	if(TotalHrs > 0) {
		BlendedValue = parseInt(SubvHybrid)/ parseInt(TotalHrs);
		$('TotalBlendedHybrid').innerHTML = "$"+addCommas(Math.round(BlendedValue));
	}else{
		$('TotalBlendedHybrid').innerHTML = "$0";
	}

	
	a = removeCommars($('TotalSub').innerHTML.substring(1));
	b = removeCommars($('TotalSubHybrid').innerHTML.substring(1));
	savings = parseInt(a)-parseInt(b);
	if(a > 0) {
		savingsPersent = Math.round((1-(parseInt(b)/parseInt(a)))*100);
		$('Savings').innerHTML = "$"+addCommas(savings);
		$('SavingsPersent').innerHTML = addCommas(savingsPersent)+"%";
	}else{
		$('Savings').innerHTML = "$0";
		$('SavingsPersent').innerHTML = "-";
	}
}

window.onload = function(){ 
				init();
				if($('headlevel3')!=null){
				sublevel('headlevel3','content-main-inside');}
}

function init(){
	

		if (window.name == "about"){
			$('tabAbout').className="tab5selected";
		}else
		if (window.name == "what"){
			$('tabWhat').className="tab6selected";
		}else
		if (window.name == "our"){
			$('tabOur').className="tab7selected";
		// }else
		// if (window.name == "why"){
			// $('tabWhy').className="tab8selected";
		// }else
		// if (window.name == "chat"){
			// $('tabChat').className="tab9selected";
		// }else
		// if (window.name == "contact"){
			// $('tabContact').className="tab10selected";
		}else if(window.name == "home"){
			if ($('tabAbout')) {
				$('tabAbout').className="tab5";
				$('tabWhat').className="tab6";
				$('tabOur').className="tab7";
				// $('tabWhy').className="tab8";
				// $('tabChat').className="tab9";
				// $('tabContact').className="tab10";
			}
		}
	
		
		
	
}


function button(num){
	var val1 = new Array("Average 100 Pages Static Web Site","10", "29", "50", "50", "0", "400", "80", "8" );
	var val2 = new Array("Average 20 Pages Interactive Web Application","15", "44", "30", "42", "36", "524", "128", "12" );
	var val3 = new Array("Average 100 Pages Interactive Web Application","77", "222", "150", "210", "180", "3200", "640", "64" );
	var val4 = new Array("Average 1000 Hours Project","16", "70", "50", "40", "20", "600", "190", "14" );
	var val5 = new Array("Average 10,000 Hours Project","166", "700", "509", "408", "209", "6000", "1900", "108" );
	var val6 = new Array("Custom","0", "0", "0", "0", "0", "0", "0", "0" );
	

	for (i=1;i<7 ;i++ )	{
		if(i != num) {
			$('clink'+i).className ="callink";
	    }else{
			$('clink'+i).className ="calSelect";
		}
	}
	
	
	if (num=="1"){
		var arr = val1;
	}
	else if (num=="2"){
		var arr = val2;
		
	}
	else if (num=="3"){
		var arr = val3;
	}
	else if (num=="4"){
		var arr = val4;
	}
	else if(num=="5"){
		var arr = val5;
	}
	else if (num=="6"){
		var arr = val6;
	}

		$('titleScenario').innerHTML =arr[0];
		for (i=1;i<9 ;i++ )	{
			$('A'+i).childNodes[1].innerHTML = arr[i];
		}
	calulateAll();
	setIndicator(num);
}



function addCommas(nStr){
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}

function tryNumberFormat(obj)
{
	obj.value = new NumberFormat(obj.value).toFormatted();
}

function is_int(event) {
  var Key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
  // the following is copied and pasted from yours
  if(Key == 13) return true;
  for(i=48;i<=57;i++){
      if(Key == i) return true;
  }
  return false;
}

////////////////////////
// @name      The Fade Anything Technique
// @namespace http://www.axentric.com/aside/fat/
// @version   1.0-RC1
// @author    Adam Michela

var Fat = {
	make_hex : function (r,g,b) 
	{
		r = r.toString(16); if (r.length == 1) r = '0' + r;
		g = g.toString(16); if (g.length == 1) g = '0' + g;
		b = b.toString(16); if (b.length == 1) b = '0' + b;
		return "#" + r + g + b;
	},
	fade_all : function ()
	{
		var a = document.getElementsByTagName("*");
		for (var i = 0; i < a.length; i++) 
		{
			var o = a[i];
			var r = /fade-?(\w{3,6})?/.exec(o.className);
			if (r)
			{
				if (!r[1]) r[1] = "";
				if (!o.id)
					o.id = 'fader_'+Math.floor(Math.random()*100);
		
				Fat.fade_element(o.id,null,null,"#"+r[1]);
			}
		}
	},
	fade_element : function (id, fps, duration, from, to) 
	{
		if (!fps) fps = 30;
		if (!duration) duration = 3000;
		if (!from || from=="#") from = "#FFFF33";
		if (!to) to = this.get_bgcolor(id);

		if (this.timers[id])
			this.cancel_fade(id);
			
		this.timers[id] = new Array();
		
		var frames = Math.round(fps * (duration / 1000));
		var interval = duration / frames;
		var delay = interval;
		var frame = 0;
		
		if (from.length < 7) from += from.substr(1,3);
		if (to.length < 7) to += to.substr(1,3);
		
		var rf = parseInt(from.substr(1,2),16);
		var gf = parseInt(from.substr(3,2),16);
		var bf = parseInt(from.substr(5,2),16);
		var rt = parseInt(to.substr(1,2),16);
		var gt = parseInt(to.substr(3,2),16);
		var bt = parseInt(to.substr(5,2),16);
		
		var r,g,b,h;
		this.end = false;
		while (frame < frames)
		{
			r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
			g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
			b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
			h = this.make_hex(r,g,b);
		
			this.timers[id][this.timers[id].length] = setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);

			frame++;
			delay = interval * frame; 
		}
		this.timers[id][this.timers[id].length] = setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
	},
	cancel_fade : function(id)
	{
		if (!this.timers[id])
			return;
		
		for (var i=0; i<this.timers[id].length; i++)
			clearTimeout(this.timers[id][i]);
	},
	set_bgcolor : function (id, c)
	{
		var o = document.getElementById(id);
		
		o.style.backgroundColor = c;
	},
	get_bgcolor : function (id)
	{
		var o = document.getElementById(id);
		while(o)
		{
			var c;
			/* if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
			if (o.currentStyle) c = o.currentStyle.backgroundColor;
			if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; } */
			
			// This is the new part, changed by Adrian to solve a problem with Safari
			if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
			else if (o.currentStyle) c = o.currentStyle.backgroundColor;
			else c = document.defaultView.getComputedStyle(o,null).getPropertyValue('background-color');
			if ((c != "" && c != "transparent" && c != "rgba(0, 0, 0, 0)") || o.tagName == "BODY") { break; }
			// End of Adrian change

			o = o.parentNode;
		}
		if (c == undefined || c == "" || c == "transparent" || c == "rgba(0, 0, 0, 0)") c = "#FFFFFF"; // Also changed by Adrian
		var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
		if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
		return c;
	},
	timers : new Array()
}
addLoadEvent(function ()  {
	Fat.fade_all();
	var objNewclass1 = document.getElementsByClassName('fade-ff9900');
	for(var i=0;i<objNewclass1.length;i++) {
		objNewclass1[i].className = 'number';
		//alert(objNewclass1[i].innerHTML);
		//alert(objNewclass1[i].className);
	}
	
	
});

function changeMenutab(){

}

function onChangeTab(obj){
			if (obj == 'TabTrends'){	
							if ($('TabTrendsContent').style.display == 'none'){		
							$('TabTrendsContent').style.display='block';
							$('TabRareplaypicksContent').style.display='none';														
							$('TabTrends').className="TabTrendsHover";	
							$('TabRareplaypicks').className="TabAccolades";		
							}																											
			}
			else if (obj == 'TabRareplaypicks'){
							if ($('TabRareplaypicksContent').style.display == 'none'){								
							$('TabRareplaypicksContent').style.display='block';							
							$('TabTrendsContent').style.display='none';
							$('TabRareplaypicks').className="TabAccoladesHover";	
							$('TabTrends').className="TabTrends";				
							}				
			}
					
		
}


// MM_preloadImages('img/arrow_yellow.gif','img/tab_about2.gif','img/tab_what2.gif','img/tab_our2.gif','img/tab_why2.gif');


function sublevel(id,id2)
{
	Element.cleanWhitespace(id2);
	var texthead = $(id2).childNodes[0].innerHTML.replace("<BR>","");
	//alert($(id2).childNodes[0].innerHTML.replace("<BR>",""));
	//alert(texthead);
	$(id).innerHTML = texthead;
}

function is_int_y(event) 
{
	var Key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	  // the following is copied and pasted from yours
	  if(Key == 13) 
	  {
		CheckEmailExist();
		return false;
	  }
}

function chk_form()
{
	var email = $('ffemail').value;
	if(checkEmail($('ffemail').value)) {
		return true;
	}
	else
	{
		return false;
	}
}

function validateBlank()
{
}

function Openit(){
document.getElementById("ppllayer").style.display = 'block';
}
function Closeit(){
document.getElementById("ppllayer").style.display = 'none';
}
