
var myimages=new Array()

function preloadimages() {
	for (i=0;i<preloadimages.arguments.length;i++){
		myimages[i]=new Image();
		myimages[i].src=preloadimages.arguments[i];
	}
}

preloadimages("images/TopLeftRenegadeLogoOver.gif","images/TopRightNavigationTheCompan_Over.gif","images/TopRightNavigationTheWork_Over.gif","images/TopRightNavigationTheNews_Over.gif","images/TopRightNavigationTheContac_Over.gif");

function moveFooter() {
//	alert(document.getElementById('body').offsetHeight);
	nFooterPos = document.getElementById('body').offsetHeight + 135;
	document.getElementById('footer').style.top = nFooterPos;

}

function moveScratches() {

nBodyHeight = document.getElementById('body').offsetHeight;

nScratch1Top = (Math.round((Math.random()*nBodyHeight)+1))
nScratch2Top = (Math.round((Math.random()*nBodyHeight)+1))
nScratch3Top = (Math.round((Math.random()*nBodyHeight)+1))

nScratch1Left = (Math.round((Math.random()*740)+5))
nScratch2Left = (Math.round((Math.random()*740)+5))
nScratch3Left = (Math.round((Math.random()*740)+5))


	document.getElementById('speck1').style.top = nScratch1Top+200;
	document.getElementById('speck2').style.top = nScratch2Top+200;
	document.getElementById('speck3').style.top = nScratch3Top+200;

	document.getElementById('speck1').style.left = nScratch1Left;
	document.getElementById('speck2').style.left = nScratch2Left;
	document.getElementById('speck3').style.left = nScratch3Left;

}


function showDiv(sContentDivName) {
	document.getElementById(sContentDivName).style.display="block";
}

function hideDiv(sContentDivName) {
	document.getElementById(sContentDivName).style.display="none";
}


function rhcDivOn(sContentDivName) {
	document.getElementById(sContentDivName).className="rhc_content_on";
}

function rhcDivOff(sContentDivName) {
	document.getElementById(sContentDivName).className="rhc_content_off";
}

function rhcSubDivOn(sContentDivName) {
	document.getElementById(sContentDivName).className="rhc_content_on";
}

function rhcSubDivOff(sContentDivName) {
	document.getElementById(sContentDivName).className="rhc_content";
}


aClients = new Array("bearing","bluefly","bowne","cable","cad","casio","cfc","citibank","doubleclick","gilda","hsbc","hasbro","ibm","moravian","nautica","nike","nolet","olympus","panasonic","ravenswood","redbox","seagrams","tre","toasted","ubisoft");

aClientSubs = new Array("bearing_rhc_empower","bluefly_rhc_birkin","bowne_rhc_case","cable_rhc_optimist","cad_rhc_club","casio_rhc_gshock","cfc_rhc_cfc","cfc_rhc_kfc","citibank_rhc_c2it","doubleclick_rhc_europe","doubleclick_rhc_goldmine","gilda_rhc_livingroom","gilda_rhc_website","hsbc_rhc_bankcab","hasbro_rhc_queasybake","ibm_rhc_geekspa","ibm_rhc_barcode","moravian_rhc_website","nautica_rhc_fcg","nike_rhc_tennis", "nolet_rhc_harlem","olympus_rhc_eye", "panasonic_rhc_pana_redesign", "panasonic_rhc_pana_2008olympics", "panasonic_rhc_ast","panasonic_rhc_club","panasonic_rhc_corporate","panasonic_rhc_dsc","panasonic_rhc_hdliving","panasonic_rhc_lifebox","panasonic_rhc_support","panasonic_rhc_nyb","panasonic_rhc_plasma","panasonic_rhc_savesummer","panasonic_rhc_shockwave","panasonic_rhc_technics","panasonic_rhc_toughbook","panasonic_rhc_ewear","panasonic_rhc_oxyoff","panasonic_rhc_oxyon","ravenswood_rhc_zinfo","redbox_rhc_rainy","seagrams_rhc_coolers","tre_rhc_web","toasted_rhc_fire","ubisoft_rhc_hell");


function openClient(sURL) {

window.location = sURL;

}


function changeLeftNav(sClientName,sSubDivNameOn) {
	sSubName = sClientName + "_rhc_sub";
	for(i=0; i<aClients.length; i++) {
		sClientRHCDivName = aClients[i] + "_rhc";
		sClientRHCDivSubName = aClients[i] + "_rhc_sub";
		sClientRHCDivTextName = aClients[i] + "_rhctext";
		if (sClientName!='') {
			if (aClients[i]==sClientName) {
				showDiv(sClientRHCDivSubName);
				rhcDivOn(sClientRHCDivTextName);
			} else {
				rhcDivOff(sClientRHCDivTextName);
				hideDiv(sClientRHCDivSubName);
			}
		} else {
			rhcDivOff(sClientRHCDivTextName);
			hideDiv(sClientRHCDivSubName);
		}
	}



	for(i=0; i<aClientSubs.length; i++) {
		sArrowId = aClientSubs[i] + "_arrow";
		if (document.getElementById(aClientSubs[i])!=null) {
			if (sSubDivNameOn!='') {
				if (aClientSubs[i]==sSubDivNameOn) {
					rhcSubDivOn(aClientSubs[i]);
					document.getElementById(sArrowId).src="images/ArrowPointingLeftGrey.gif";
				} else {
					rhcSubDivOff(aClientSubs[i]);
					document.getElementById(sArrowId).src="images/spacer.gif";
				}
			}
		}
	}

}


