					// SET VARS

ie4 = (document.all)? true:false;
ns6 = (document.getElementById)? true:false;
 
if(ie4){
document.write("<link rel=stylesheet href=\"rvie.css\" type=\"text/css\">")}

else if(ns6){
document.write("<link rel=stylesheet href=\"rvfx.css\" type=\"text/css\">")}

if(document.images)
{
bakOn=new Image(788,500); bakOn.src="back/zapbakon.gif";
bakOff=new Image(788,500); bakOff.src="back/zapbakoff.gif";
}

function bgChange(bg)
	{
	document.body.background=bg;
	}

		// DIV ARRAY

ho= new Array('homeDiv', 'createDiv', 'specDiv', 'appDiv', 'visualDiv', 'ecomDiv', 'adminDiv', 'hostDiv', 'masterDiv', 'upgradeDiv', 'promoDiv', 'adverDiv', 'seoDiv', 'marketDiv', 'folioDiv', 'topixDiv');

hist = new Array();
shifty = new Array();

shifted=0;
num2=0;
hi=0;
var nDiv; 
var led="xx";

function histx(){
hist.length='0';
}
function shifx(){
shifty.length='0';
}

function prev(foo){
	num = hist.unshift(foo);
}

function plus(){
	if(hi >= 14){
	return hi=0;
	}
	else return hi++;
}

function bak(){
shifted = hist.shift();
hidalgo();
	if(ie4){
		if(hist.length>0){
			document.all[ho[hist[0]]].style.display = "block";
				if(don(ho[hist[0]]))
			     {
			     document.all[nDiv].style.display = "block";
			     }
			}else{
			document.all['homeDiv'].style.display = "block";
			document.all['homeDivN'].style.display = "block";
			}
		}
	if(ns6){
		if(hist.length>0){
			document.getElementById(ho[hist[0]]).style.display = "block";
			if(don(hist[0]))
		    	{
		    	document.getElementById(nDiv).style.display = "block";	
			    }	
		   }else{
		document.getElementById('homeDiv').style.display = "block";
		document.getElementById('homeDivN').style.display = "block";	
		}
	}
	num2 = shifty.unshift(shifted);
	return num2;
	ledon();
	}

function fwd(){
reshift = shifty.shift();
hidalgo();
	if(ie4){
		if(shifty.length>0){
			document.all[ho[shifty[0]]].style.display = "block";
				if(don(ho[shifty[0]]))
			     {
			     document.all[nDiv].style.display = "block";
			     }
			}else{
			document.all['homeDiv'].style.display = "block";
			document.all['homeDivN'].style.display = "block";
			}
		}
	if(ns6){
		if(shifty.length>0){
			document.getElementById(ho[shifty[0]]).style.display = "block";
			if(don(shifty[0]))
		    	{
		    	document.getElementById(nDiv).style.display = "block";	
			    }	
		   }else{
		document.getElementById('homeDiv').style.display = "block";
		document.getElementById('homeDivN').style.display = "block";	
		}
	}
	num = hist.unshift(reshift);
	return num;
	ledon();
	}

function don(foo){

	if ((foo > '0') && (foo < '6'))
		return sled('cc'), ledon(), nDiv='createDivN';

	else if ((foo > '5') && (foo < '10'))
		return sled('aa'), ledon(), nDiv='adminDivN';

	else if ((foo > '9') && (foo < '14'))
		return sled('pp'), ledon(), nDiv='promoDivN';

	else if ((foo > '13') && (foo < '15'))
		return sled('gg'), ledon(), nDiv='promoDivN';

	else return nDiv='homeDivN';
}

				// SHOW-HIDE

function show(foo){
	if(ie4){
		hidalgo();
		document.all[ho[foo]].style.display = "block";
			if(don(foo))
			{
			document.all[nDiv].style.display = "block";
			}
			return nDiv;
		}
	else if(ns6){
		hidalgo();
		document.getElementById(ho[foo]).style.display = "block";
			if(don(foo))
			{
			document.getElementById(nDiv).style.display = "block";	
			}
		return nDiv, hi=foo, prev(foo);
	}
}

function hidalgo(){
	if(ie4){
	for(i=0; i< ho.length; i++){
		document.all[ho[i]].style.display = "none";
		}
	document.all['createDivN'].style.display= "none";
	document.all['adminDivN'].style.display = "none";
	document.all['promoDivN'].style.display = "none";
	}
	if(ns6){
	for(i=0; i< ho.length; i++){
		document.getElementById(ho[i]).style.display = "none";
		}
	document.getElementById('createDivN').style.display = "none";
	document.getElementById('adminDivN').style.display = "none";
	document.getElementById('promoDivN').style.display = "none";
	}
}

function sled(foo){
	return led = foo;
}

function ledon(){
	if(ie4){
	document.all['xx'].style.color='#B34057';
	document.all['cc'].style.color='#B34057';
	document.all['aa'].style.color='#B34057';
	document.all['pp'].style.color='#B34057';
	document.all['ff'].style.color='#B34057';
	document.all['gg'].style.color='#B34057';
	document.all[led].style.color='#66CCFF';
	}
	if(ns6){
	document.getElementById('xx').style.color='#B34057';
	document.getElementById('cc').style.color='#B34057';
	document.getElementById('aa').style.color='#B34057';
	document.getElementById('pp').style.color='#B34057';
	document.getElementById('ff').style.color='#B34057';
	document.getElementById('gg').style.color='#B34057';
	document.getElementById(led).style.color='#66CCFF';
	}
}

function linkon(foo){
	if(ie4){document.all[foo].style.color='#66CCFF';}
	if(ns6){document.getElementById(foo).style.color='#66CCFF';}
}
function linkoff(foo){
	if(ie4){document.all[foo].style.color='#B34057';
			document.all[led].style.color='#66CCFF';}
	if(ns6){document.getElementById(foo).style.color='#B34057';
			document.getElementById(led).style.color='#66CCFF';}
}


		// DOUBLE-CLICK ACTIONS

function clickIt(e)
{
	if(ie4)
	{
	locX=window.event.clientX;
	locY=window.event.clientY;
		if ((locX > 100) && (locY > 100))
			{
			hidalgo();shifx();histx();window.location.reload();
			}
		}
		else if(ns6){
		hidalgo();shifx();histx();window.location.reload();
	}
	else return true;
}	

					// POP WIN

function launch(newURL, newName, newFeatures, momma) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
  remote.opener = window;
  remote.opener.name = momma;
  return remote;
}

function popwin(foo) { 
myRemote = launch(foo+".html", "myRemote", "height=440,width=440,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0", "myWindow")
}

