/*
	Copyright David Trewern Design         :: www.dtdesign.com ::
	Unauthorised modification / use is a criminal offence, and
	will be prosecuted to the fullest extent permitted by law.
	All Rights Reserved
*/

NAVarr = new Array("home", "yourapp", "ourrange", "yoursearch", "samples", "promotions", "tips", "about", "contact", "ico_advertising", "ico_annualreports", "ico_books", "ico_funstuff", "ico_labels", "ico_packaging", "ico_pointofsale", "ico_stationary", "print", "favourite", "resource");
if (document.images) {
	for (var NAVitem in NAVarr) { 
		 for (var NAVicount=0; NAVicount < 2; NAVicount++) { 
				eval("b" + NAVarr[NAVitem] + NAVicount + " = new Image()");
				eval("b" + NAVarr[NAVitem] + NAVicount + ".src = 'assets/swap_" + NAVarr[NAVitem] + "_" + NAVicount + ".gif'");
		 } 
	} 
}

function BturnOn(imageName) {
	if (document.images) { document [imageName].src = eval("b" +imageName + "1.src");   }
}

function BturnOff(imageName) {
	if (document.images) { document [imageName].src = eval("b" + imageName + "0.src");   }
}

function BturnOnInput(obj,imageName) {
	if (obj.src) {
		obj.src = eval("b" + imageName + "1.src");
	}
}

function BturnOffInput(obj,imageName) {
	if (obj.src) {
		obj.src = eval("b" + imageName + "0.src");
	}
}



function imgPopup(path) {
	if (path) {
		window.open("utils_imagepopup.aspx?path=" + path, "popup", "width=400, height=300, toolbar=no, status=no, scrollbars=yes, resizable=yes");
	}
}

function defValue(obj, event, defVal) {
	if (obj) {
		if (event=="f") { //onfocus
			if (obj.value == defVal) obj.value = "";
		}
		else { //onblur
			if (obj.value == "") obj.value = defVal;
		}
	}
}

function printPage() {
  
  if(window.print) {
   	window.print();
   } else {
	if(agt.indexOf("mac") != -1) {
		alert("To print this page press Command-P.");
	} else {
		alert("To print this page press Control-P.");
	}
   }
   
}

