function e(id)
{
	return document.getElementById(id)?document.getElementById(id):false;
} 


function setActiveNav(id){
	if (true ||  e("sub_" + id)){
	
		var nav_id = id.split("_")[0]
	
		if (e("nav_" + nav_id)){
			e("nav_" + nav_id).className = ("nav-on");
			if (e("sub_" + nav_id)){
				e("sub_" + nav_id).style.display = "";
			}	
		}
		
	}
	
	if (e("body_table")){
		e("body_table").className = "body_table_" + id;
	}
	
	if (e("right_col")){
		e("right_col").className = "right_col_" + id;
	}
	
}


function hideSideBar(){
	if (e("right_col")){
		e("right_col").style.display = "none";
	}

}
function hideBodyPadding(){
	if (e("content_padding")){
		e("content_padding").style.display = "none";
	}

}


/* GENERAL IMAGE ROLLOVER
-------------------------- */

function rollOver(img_obj){
	img_obj.src=String(img_obj.src).split('-off').join('-on');
}

function rollOut(img_obj){
	img_obj.src=String(img_obj.src).split('-on').join('-off');
}


function showContactInfo(b){
	if (!e("col_contact") || !e("fresh_blurb")){
		return;	
	}
	if (b){
		e("col_contact").style.display = "";
		e("fresh_blurb").style.display = "none";
	} else {
		e("col_contact").style.display = "none";
		e("fresh_blurb").style.display = "";		
	}
}

function showCountries(b){
	if (e("countries")){
		if (b){
			e("countries").style.display = "";
		} else {
			e("countries").style.display = "none";
		
		}
	}

}

function hideBottomPadding(){
	if (e("content_bottom_padding")){
		e("content_bottom_padding").style.display = "none";
	}
}


/* POPUP FOR SAMPLE SCREENS
---------------------------- */

function openPopupWindow(url, name, width, height, returnWindow)
{
	var horizontalOffset, verticalOffset, offsetAmount, windowToReturn, closethiswindow;
		
	offsetAmount = 0;
	
	if(width == -1)
	{
	
  	if ((screen.Height >= 0) && (screen.Width >= 0)) {
     		 width = screen.Width - 10;
 	 }
  	else if ((screen.availHeight >= 0) && (screen.availWidth >= 0)) {
      		 width = screen.availWidth - 10;
  	}
	}	
	
	if(height == -1)
	{
	if ((screen.Height >= 0) && (screen.Width >= 0)) {
     		 height = screen.Height - 75;
    }
  	else if ((screen.availHeight >= 0) && (screen.availWidth >= 0)) {
      		 height = screen.availHeight - 45;
    }
	}
	
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		horizontalOffset = window.screenLeft + offsetAmount;
		verticalOffset = window.screenTop + offsetAmount;
	}
	else
	{
		horizontalOffset = window.screenX + offsetAmount;
		verticalOffset = window.screenY + offsetAmount;
	}
	
	if(horizontalOffset + width > screen.availWidth || verticalOffset + height > screen.availHeight)
	{
		horizontalOffset = 0;
		verticalOffset = 0;
	}
		
	//windowToReturn = window.open(url, name, "toolbar=0,location=0,directories=0,status=yes,menubar=no,scrollbars=1,resizable=yes,screenX=" + horizontalOffset + ",screenY=" + verticalOffset + ",left=" + horizontalOffset + ",top=" + verticalOffset + ",width=" + width + ",height=" + height);
	windowToReturn = window.open(url, name, "toolbar=0,location=0,directories=0,status=yes,menubar=no,scrollbars=1,resizable=yes,screenX=" + horizontalOffset + ",screenY=" + verticalOffset + ",left=" + horizontalOffset + ",top=" + verticalOffset + ",width=" + width + ",height=" + height);
}




