

function swapNav(vID, vNewImg){

    var vImg = document.getElementById(vID);
    vImg.src = "images/nav/" + vNewImg + ".gif";
    
}



function setSelected(vID, vNewImg){

    var vImg = document.getElementById(vID);
    vImg.src = "images/nav/" + vNewImg + ".gif";
    
}



function preloadHomeTop() {

    var vImgPath = "images/nav/";
    var imgNames = ['home_top_on_about', 'home_top_off_about', 'home_top_on_work', 'home_top_off_work', 'home_top_on_clients', 'home_top_off_clients', 'home_top_on_contact', 'home_top_off_contact'];
    var imgObjects = [];

    for (var i = 0; i < imgNames.length; i++)
    {
        imgObjects[i] = new Image();
        imgObjects[i].src = vImgPath + imgNames[i] + '.gif';
		
		//Developer Test
		//document.write("<img src='" + vImgPath + imgNames[i] + '.gif' + "'><br>")
    }

}


function preloadSubTop() {

    var vImgPath = "images/nav/";
    var imgNames = ['sub_top_off_about', 'sub_top_on_about', 'sub_top_off_clients', 'sub_top_on_clients', 'sub_top_off_contact', 'sub_top_on_contact', 'sub_top_off_home', 'sub_top_on_home', 'sub_top_off_work', 'sub_top_on_work'];
    var imgObjects = [];

    for (var i = 0; i < imgNames.length; i++)
    {
        imgObjects[i] = new Image();
        imgObjects[i].src = vImgPath + imgNames[i] + '.gif';
		
		//Developer Test
		//document.write("<img src='" + vImgPath + imgNames[i] + '.gif' + "'><br>")
    }

}


function preloadWorkLeft() {

    var vImgPath = "images/nav/";
    var imgNames = ['sub_left_off_advertising', 'sub_left_on_advertising', 'sub_left_off_annualrpts', 'sub_left_on_annualrpts', 'sub_left_off_branding', 'sub_left_on_branding', 'sub_left_off_dimensional', 'sub_left_on_dimensional','sub_left_off_directmail', 'sub_left_on_directmail', 'sub_left_off_events', 'sub_left_on_events', 'sub_left_off_exhibitions', 'sub_left_on_exhibitions', 'sub_left_off_interactive', 'sub_left_on_interactive', 'sub_left_off_print', 'sub_left_on_print', 'sub_left_off_publications', 'sub_left_on_publications', 'sub_left_off_symbols', 'sub_left_on_symbols'];
    var imgObjects = [];

    for (var i = 0; i < imgNames.length; i++)
    {
        imgObjects[i] = new Image();
        imgObjects[i].src = vImgPath + imgNames[i] + '.gif';
		
		//Developer Test
		//document.write("<img src='" + vImgPath + imgNames[i] + '.gif' + "'><br>")
    }

}



function preloadClientsLeft() {

    var vImgPath = "images/nav/";
    var imgNames = ['clients_left_off_corporate', 'clients_left_on_corporate', 'clients_left_off_np', 'clients_left_on_np' ];
    var imgObjects = [];

    for (var i = 0; i < imgNames.length; i++)
    {
        imgObjects[i] = new Image();
        imgObjects[i].src = vImgPath + imgNames[i] + '.gif';
		
		//Developer Test
		//document.write("<img src='" + vImgPath + imgNames[i] + '.gif' + "'><br>")
    }

}



function preloadWorkSubNav() {

    var vImgPath = "images/work/_shell/";
    var imgNames = ['b01on','b01off','b02on','b02off','b03on','b03off','b04on','b04off','b05on','b05off','b06on','b06off','b07on','b07off','b08on','b08off','b09on','b09off','b10on','b10off'];
    var imgObjects = [];

    for (var i = 0; i < imgNames.length; i++)
    {
        imgObjects[i] = new Image();
        imgObjects[i].src = vImgPath + imgNames[i] + '.gif';
		
		//Developer Test
		//document.write("<img src='" + vImgPath + imgNames[i] + '.gif' + "'><br>")
    }
    
    
    img1001 = new Image();
    img1001.src = 'images/work_back_on.gif';
    
    img1002 = new Image();
    img1002.src = 'images/work_next_on.gif';

}




var vWinLocation = null; 
var vURL = null;
var vAvailWidth = screen.availWidth;
var vAvailHeight = screen.availHeight;
var w = 0;
var h = 0;
var vToolbar = 0;
var vLocation = 0;
var vDirectories = 0;
var vStatus = 0;
var vMenubar = 0;
var vScrollbars = 0;
var vResizeable = 0;
		
		
function buildWorkPopup(vURL,w,h,vToolbar,vLocation,vDirectories,vStatus,vMenubar,vScrollbars,vResizeable) {
	vWinLocation = window.open(vURL,'posB','width=' + w + ',height=' + h + ',left=' + ((vAvailWidth - w - 10) * .5) + ',top=' + ((vAvailHeight - h - 30) * .5) + 'toolbar='+ vToolbar +',location='+ vLocation +',directories='+ vDirectories +',status='+ vStatus +',menuBar='+ vMenubar +',scrollBars='+ vScrollbars +',resizable='+ vResizeable );
	vWinLocation.focus();
}




function subWork(vSrc){

    var vImg = document.getElementById('imgW');
    vImg.src = vSrc;
    
}


function subWorkLG(vSrc){

    var vImg = document.getElementById('imgLG');
    vImg.src = vSrc;
    
}


function setWorkLink(vNewLink){

	var vLink = document.getElementById('_work_popup');
	vLink.href = vNewLink;

}


function setCloseLink(vNewLink){
	//do nothing, old code
}


function FixAltText() {
	var vImg = document.getElementById('_close_image');
	vImg.alt = "Close Window";
	vImg.title = "Close Window";
}


function setSubNav(vID, vSrc){
	
	if (document.getElementById('b01')) {
	   document.getElementById('b01').src = 'images/work/_shell/b01off.gif';
	}
	
	if (document.getElementById('b02')) {
	   document.getElementById('b02').src = 'images/work/_shell/b02off.gif';
	}
	if (document.getElementById('b03')) {
	   document.getElementById('b03').src = 'images/work/_shell/b03off.gif';
	}
	if (document.getElementById('b04')) {
	   document.getElementById('b04').src = 'images/work/_shell/b04off.gif';
	}
	if (document.getElementById('b05')) {
	   document.getElementById('b05').src = 'images/work/_shell/b05off.gif';
	}
	if (document.getElementById('b06')) {
	   document.getElementById('b06').src = 'images/work/_shell/b06off.gif';
	}
	if (document.getElementById('b07')) {
	   document.getElementById('b07').src = 'images/work/_shell/b07off.gif';
	}
	if (document.getElementById('b08')) {
	   document.getElementById('b08').src = 'images/work/_shell/b08off.gif';
	}
	if (document.getElementById('b09')) {
	   document.getElementById('b09').src = 'images/work/_shell/b09off.gif';
	}
	if (document.getElementById('b10')) {
	   document.getElementById('b10').src = 'images/work/_shell/b10off.gif';
	}
	
	
	var vImg = document.getElementById(vID);
    vImg.src = 'images/work/_shell/' + vSrc + '.gif';
	
}






