//all codes authored by webninja
//except for "MM_" prefixed functions by Macromedia
//copyright 2001-2003 bytemarks

//-----------------------
//---- Common functions ---
//-----------------------

var maxlayers = 5;

function display(pix,loc) {
	document[loc].src=pix;
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//hide/show subnavigation layers
function hideAllLayers(exception) {
	var k;
	for (k=0;k<maxlayers;k++) MM_showHideLayers('layer' + k,'','hide');
	MM_showHideLayers('layer' + exception,'','show');
}
// end subnav

//window pop-up script
function openWin( windowURL, windowName, windowFeatures ) { 
	return window.open( windowURL, windowName, windowFeatures ) ; 
}

function popUp(thisUrl){
	var winProps = "width=400,height=320,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=1"
	var newWindow = openWin(thisUrl, "myPopup", winProps); 
	newWindow.focus()
}

function preload_images() {
	MM_preloadImages(path + 'images/nav_home_on.gif',
		path + 'images/nav_home_off.gif',
		path + 'images/nav_aboutus_on.gif',
		path + 'images/nav_aboutus_off.gif',
		path + 'images/nav_products_on.gif',
		path + 'images/nav_products_off.gif',
		path + 'images/nav_services_on.gif',
		path + 'images/nav_services_off.gif',
		path + 'images/nav_contactus_on.gif',
		path + 'images/nav_contactus_off.gif');
}

//------------------------------------
//---- Multi-image MouseOvers scripts ----
//------------------------------------

function revert() {
	display(path + 'images/nav_home_off.gif','nav_home');
	display(path + 'images/nav_aboutus_off.gif','nav_aboutus');
	display(path + 'images/nav_products_off.gif','nav_products');
	display(path + 'images/nav_services_off.gif','nav_services');
	display(path + 'images/nav_contactus_off.gif','nav_contactus');
	switch(page) {
		case "home": 
			display(path + 'images/nav_home_on.gif',"nav_home");break;
		case "aboutus":
			display(path + 'images/nav_aboutus_on.gif','nav_aboutus'); break;		
		case "products": 
			display(path + 'images/nav_products_on.gif','nav_products'); break;		
		case "services": 
			display(path + 'images/nav_services_on.gif','nav_services'); break;		
		case "contactus": 
			display(path + 'images/nav_contactus_on.gif','nav_contactus'); break;		
		default: break;
	}
}

function display_icons(page) {
	if (page!="") {
		display(path + 'images/nav_' + page + '_on.gif','nav_' + page);
	}
}

function display_portf(y) {
	if (y!="") display(path + 'images/navtop_' + y + '_on.gif',y);
}