// AMM 20090325
/* This script is for the styling of the sections under a market */

function local_market_nav_rollover()
{
  if(!document.getElementById || !document.createTextNode){return;}
  var n=document.getElementById('local_market_nav');
  if(!n){return;}
  var lis=n.getElementsByTagName('li');
  for (var i=0;i<lis.length;i++)
  {
    lis[i].onmouseover=function(){this.className=this.className?'active':'over';}
    lis[i].onmouseout=function(){this.className=this.className=='active'?'active':'';}
  }
}

window.onload=local_market_nav_rollover;


/////////////////////////////////////////////////////////////////////////////////////


// AMM 20090512
// This script is for openning popup windows

/* Popup window opener -  AMM 20090507 - START */

function openPopup(url, window_name, width, height, left, top) {

	var settings ='height='+height+',';
    settings +='width='+width+',';
    settings +='top='+top+',';
    settings +='left='+left+',';
	settings +='toolbar=no,directories=no,location=yes,menubar=no,status=yes,resizable=yes,scrollbars=yes';

	win=window.open(url,window_name,settings);

	if (window.focus) {win.focus()}

}

function openCenteredPopup (url, window_name, width, height) {

	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;

	openPopup(url, window_name, width, height, left, top); 
}

/* Popup window opener -  AMM 20090507 - END */

// end 
