///// CLEAR FORM TEXT //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function reinstateText(thefield){
if (thefield.value == "") {
thefield.value = thefield.defaultValue;
} 
}

function clearText(thefield){
if (thefield.defaultValue==thefield.value){
thefield.value = "";
}
}



/////////////////////////////////////////////////////////////////////////////////////////////




function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function swap() {
	if (document.images && (preloadFlag == true)) {
		document[swap.arguments[0]].src = swap.arguments[1];
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		tab_clients_roll = newImage("../images/tab_clients_roll.gif");
		tab_contact_roll = newImage("../images/tab_contact_roll.gif");
		tab_downloads_roll = newImage("../images/tab_downloads_roll.gif");
		tab_home_roll = newImage("../images/tab_home_roll.gif");
		tab_locations_roll = newImage("../images/tab_locations_roll.gif");
		tab_news_roll = newImage("../images/tab_news_roll.gif");
		tab_supserv_roll = newImage("../images/tab_supserv_roll.gif");
		preloadFlag = true;
	}
}
preloadImages();

/* ------- Window opener -----------*/
function moreinfo(url,title){
	javascript:window.open(url, title, 'height=400,width=550,menubar=no,resizable=yes,titlebar=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
}

/* --------- LOCATIONS ------------- */
function getLocation(cat,title,id){
	var url = 'location.asp?cat='+cat+'&title='+title+'&ID='+id+'&nav=nav';
	self.location=url;
}

function viewTearSheet(id,cat){
	javascript:window.open('tearsheet.asp?cat='+cat+'&ID='+id, 'tearsheet', 'height=400,width=550,menubar=no,resizable=no,titlebar=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
}

function openwindow(w,h, url){
	//window.alert('opening window');
	window.open(url, null, 'height='+h+',width='+w+',status=yes,toolbar=no,menubar=no,location=no');

}