winWidth = 800; // sets a default width for browsers who do not understand screen.width below
winheight = 600; // ditto for height

if (screen){ // weeds out older browsers who do not understand screen.width/screen.height
winWidth = screen.width;
winHeight = screen.height;
}

// this function calls a popupWindow where
// win is the page address i.e. '../page.htm'

function popupWindow(win){

newWindow = window.open(win,'newWin','titlebar=no,toolbar=no,location=no,scrollbars=no,resizable= no,width='+winWidth+',height='+winHeight+',left=0,top=0');
newWindow.focus();
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_over = newImage("images/home-over.gif");
		about_over = newImage("images/about-over.gif");
		difuction_over = newImage("images/difuction-over.gif");
		herb_over = newImage("images/herb-over.gif");
		outlets_over = newImage("images/outlets-over.gif");
		faq_over = newImage("images/faq-over.gif");
		button_big_over = newImage("images/button_big-over.gif");
		testimon_over = newImage("images/testimon-over.gif");
		preloadFlag = true;
	}
}

function openwindow(url){
	window.open(url, "hesWindow", "location=0,menubar=0,scrollbars=1,titlebar=0,toolbar=0,personalbar=0,status=0,resizable=1,width=695,height=500");
	}
	

