var PAGE_ID = 34;

/***** JS ID = 50 *****/
function phpfiles__onload ()
{
	include('/includes/log_duration_update.php?calls_ct=0&page_id='+PAGE_ID);
	include('http://www.me16.com/directory/update_distances.php');
}
addOnload (phpfiles__onload);

function minWidth()
{
	if(typeof(document.body.style.minWidth) != 'undefined') return;

	children = document.body.childNodes;

	div1 = document.createElement("div");
	div1.style.height = "1px";
	div1.style.paddingLeft = "49.8em";

	div2 = document.createElement("div");
	div2.style.height = "1px";

	div3 = document.createElement("div");
	div3.style.height = "1px";
	div3.style.marginLeft = "-49.8em";
	div3.style.position = "relative";

	div4 = document.createElement("div");
	div4.style.height = "1px";

	for (i=children.length; i>0; i--)
	{
	  div4.appendChild(children[0]);
	}

	div3.appendChild(div4);
	div2.appendChild(div3);
	div1.appendChild(div2);
	document.body.appendChild(div1);
}

addOnload(minWidth);


/***** JS ID = 58 *****/
function navigation__onload ()
{
	var lis = document.getElementById('navigcol').getElementsByTagName('li');

	for (var i=0;i<lis.length;i++)
	{
	  lis[i].onmouseover = showmenu;
	  lis[i].onmouseout = hidemenu;
	}
}

function showmenu()
{
	if (this.getElementsByTagName('ul')[0])
	{
	  jscss ('add', this.getElementsByTagName('ul')[0], 'hovered');
	}
}

function hidemenu()
{
	if (this.getElementsByTagName('ul')[0])
	{
	  jscss ('remove', this.getElementsByTagName('ul')[0], 'hovered');
	}
}

addOnload(navigation__onload);


/***** JS ID = 59 *****/




/***** JS STANDARD FUNCTIONS *****/

function jscss(a,o,c1,c2)
{
	var classname = o.className
	switch (a) {
	  case 'add':
	    if(!jscss('check',o,c1)){ o.className += (o.className ? ' ' : '') + c1; }
	  break;
	  case 'remove':
	    o.className=o.className.replace(new RegExp('(^| )'+c1+'( |$)'),'');
	  break;
	  case 'check':
	    return new RegExp('(^| )'+c1+'( |$)').test(o.className)
	  break;
	}
}
function include(fname)
{
	// create new script element, set its relative URL, and load it
	script = document.createElement( 'script' );
	if (typeof fname == 'string') {
	  script.setAttribute('src', fname);
	}
	else if (typeof fname == 'number') {
	  script.setAttribute('src', '/includes/jscss.php?type=js&jscss_id='+fname);
	}	  
	script.setAttribute('type', 'text/javascript');
	document.getElementsByTagName( 'head' )[0].appendChild( script );
}
function addOnload (func)
{
	if (window.attachEvent) 
	  window.attachEvent('onload', func);
	else if (window.addEventListener)
	  window.addEventListener('load', func, false);
}
