//Home Page Nav Image objects

indexHome_on = new Image;
indexHome_on.src = "images/homeNav.gif";
//home_off = new Image;
//home_off.src = "images/home_off.gif"

portfolioHome_on = new Image;
portfolioHome_on.src = "images/portfolioHome_on.gif";
portfolioHome_off = new Image;
portfolioHome_off.src = "images/homeNav.gif";

resumeHome_on = new Image;
resumeHome_on.src = "images/resumeHome_on.gif";
resumeHome_off = new Image;
resumeHome_off.src = "images/homeNav.gif";


agreementHome_on = new Image;
agreementHome_on.src = "images/agreementHome_on.gif";
agreementHome_off = new Image;
agreementHome_off.src = "images/homeNav.gif";


educationHome_on = new Image;
educationHome_on.src = "images/educationHome_on.gif";
educationHome_off = new Image;
educationHome_off.src = "images/homeNav.gif";

contactHome_on = new Image;
contactHome_on.src = "images/contactHome_on.gif";
contactHome_off = new Image;
contactHome_off.src = "images/contactHome_off.gif"

linksHome_on = new Image;
linksHome_on.src = "images/linksHome_on.gif";
linksHome_off = new Image;
linksHome_off.src = "images/linksHome_off.gif"


//Sub Page Nav Image objects

index_on = new Image;
index_on.src = "images/nav.gif";
//home_off = new Image;
//home_off.src = "images/home_off.gif"

portfolio_on = new Image;
portfolio_on.src = "images/portfolio_on.gif";
portfolio_off = new Image;
portfolio_off.src = "images/nav.gif";

agreement_on = new Image;
agreement_on.src = "images/agreement_on.gif";
agreement_off = new Image;
agreement_off.src = "images/nav.gif";

resume_on = new Image;
resume_on.src = "images/resume_on.gif";
resume_off = new Image;
resume_off.src = "images/nav.gif";

//education_on = new Image;
//education_on.src = "images/education_on.gif";
//education_off = new Image;
//education_off.src = "images/nav.gif";

//Image objects for Sub Page with no main Top Nav

contact_on = new Image;
contact_on.src = "images/contact_on.gif";
contact_off = new Image;
contact_off.src = "images/contact_off.gif"

links_on = new Image;
links_on.src = "images/links_on.gif";
links_off = new Image;
links_off.src = "images/links_off.gif"

noNav_on = new Image;
noNav_on.src = "images/nav.gif";
noNav_off = new Image;
noNav_off.src = "images/nav.gif"

var curPage = "";

//alert(document.domain);
function toggleNavImg(id,state){
	var linkObj = document.getElementById("index");
	var url = "";
	if(document.domain == "localhost"){
		url = "http://" + document.domain + "/cwgcopywriting/" + curPage + ".asp";
	}
	else {
		url = "http://" + document.domain + "/" + curPage + ".asp"
	}
	
	if(document.location == url && id == curPage){
			id = curPage;
			state = "on";
	}
	
	linkObj.src = eval(id + "_" + state + ".src");	
}

function toggleImg(id,state){
	
	var linkObj = document.getElementById(id);
	var url = "";
	if(document.domain == "localhost"){
		url = "http://" + document.domain + "/cwgcopywriting/" + id + ".asp";
	}
	else {
		url = "http://" + document.domain + "/" + id + ".asp"
	}
	
	if(document.location == url){
			state = "on";			
	}	
	linkObj.src = eval(id + "_" + state + ".src");
}

function fliplinktooff(name)
{
var doc = "document.";
var linkobj = eval(doc+name);



linkobj.src = eval(name + "_off.src");

}

function toggleHomeImg(id,state){

	var linkobj = document.getElementById("indexHome");	
	

	linkobj.src = eval(id + "_" + state + ".src");
}


function showCurPage (){
	alert(curPage);
}


//alert("page is " + top.Main.document.location);
function callfliplinks(){

if(document.location == "http://localhost/abundantresults/home.html"){
		fliplinks("home","on");		
		}

if(document.location == "http://localhost/abundantresults/samples.html"){
		fliplinks("samples","on");		
		}		
		
if(document.location == "http://localhost/abundantresults/experience.html"){
		fliplinks("experience","on");		
		}		
		
if(document.location == "http://localhost/abundantresults/education.html"){
		fliplinks("education","on");		
		}		
		
if(document.location == "http://localhost/abundantresults/resume.html"){
		fliplinks("resume","on");		
		}		
		
if(document.location == "http://localhost/abundantresults/contact.html"){
		fliplinks("contact","on");		
		}		

if(document.location == "http://localhost/abundantresults/links.html"){
		fliplinks("links","on");		
		}	
}

function callfliplinktooff(){

if(document.location != "http://localhost/abundantresults/home.html"){
		fliplinktooff("home");		
		}
		
if(document.location != "http://localhost/abundantresults/samples.html"){
		fliplinktooff("samples");		
		}
		
if(document.location != "http://localhost/abundantresults/experience.html"){
		fliplinktooff("experience");		
		}
		
if(document.location != "http://localhost/abundantresults/education.html"){
		fliplinktooff("education");		
		}
		
if(document.location != "http://localhost/abundantresults/resume.html"){
		fliplinktooff("resume");		
		}
		
if(document.location != "http://localhost/abundantresults/contact.html"){
		fliplinktooff("contact");		
		}
		
if(document.location != "http://localhost/abundantresults/links.html"){
		fliplinktooff("links");		
		}

}