<!--
//  This version of the refresh function will cause a new
//  entry in the visitor's history.  It is provided for
//  those browsers that only support JavaScript 1.0.
//  This is only for the redirect.

var sURL = unescape(window.location.href);
var edittable = null;
var previewListing = null;
var inPopUp;

function windowClose(windowname)
{
	if (windowname && windowname.open && !windowname.closed) windowname.close();
}


function tablePopUpLg(link)
{
	windowClose(previewListing);
	previewListing = window.open(link,'_previewListing','toolbar=no,width=725,height=500,resizable=no,scrollbars=yes');
	previewListing.focus();
	if (inPopUp) self.close();
}

function tablePopUp(link)
{
	windowClose(edittable);
	edittable = window.open(link,'_edittable','toolbar=no,width=550,height=550,resizable=yes,scrollbars=yes');
	edittable.focus();
	if (inPopUp) self.close();
}

function tablePopUpAdjust(link, height, width)
{
	if(width<=550){width=550;}
	if(height<=350){height=350;}
	windowClose(edittable);
	edittable = window.open(link,'_edittable',"toolbar=no,width=" + width + ",height=" + height + ",resizable=no,scrollbars=yes");
	edittable.focus();
	if (inPopUp) self.close();
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

// *****************************Fly Menu Functions compatibal with Net 4, 6 and IE 5.5 *******************


//  ********************** Text Menu Mouse over **************************************
var ns4 = (document.layers ? true:false);
var ns6 = (document.getElementById ? true:false);
var ie4 = (document.all ? true:false);
var g_Color_On ="#232A56";//99FF99 66CC66 76A0BE
var g_Color_Off ="#FFFFFF";
var mac;
var agt=navigator.userAgent.toLowerCase();
var is_mac    = (agt.indexOf("mac")!=-1);

if (agt.indexOf("mac")!=-1) {
mac=true;
}
else {
mac=false;
}


function mouseChange(m_id, m_status) {
	if (ns4) {m_id.bgColor = ((m_status == 1) ? g_Color_On : g_Color_Off);}
	if (ns6) {m_id.bgColor = ((m_status == 1) ? g_Color_On : g_Color_Off);}
	if (ie4) {m_id.style.backgroundColor = ((m_status == 1) ? g_Color_On : g_Color_Off);}
}


var TimerID;
ns= 0;




if (navigator.appName == "Netscape") {
// *********************For Netscape 6 *********************************************
	if (parseInt(navigator.appVersion)  == 5) {
		layerRef="document.getElementById";
		styleSwitch =".style";
		ns = 1;
	}
// *********************For Netscape 4 *********************************************
	else {
		layerRef="document.layers";
		styleSwitch="";
	}
}
// *********************For IE *****************************************************
else {
	layerRef="document.all";
	styleSwitch=".style";
}

function fadeLayer(layerName) {
     clearTimeout(TimerID)
     //TimerID = self.setTimeout('hideLayer("buttonLayerID' + layerName + '")', 750)
     self.setTimeout('hideLayer("buttonLayerID' + layerName + '")', 750)	
}


function showLayer (layerName) {
    self.clearTimeout(TimerID)
// *********************For Netscape 4 *********************************************
	if (ns4) {
			x = 'document.' + layerName;
			eval(x +'.visibility = "show"');
	}
// *********************For IE *****************************************************
	else if (layerRef == "document.all") {
		if (eval(layerRef + '["' + layerName + '"]')) {
			eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility ="visible"');
		
		}
	}
// *********************For Netscape 6 *********************************************
	else if (layerRef == "document.getElementById") {
		x = 'document.getElementById("' + layerName + '")';
		eval(x + styleSwitch +'.visibility="visible"');
	}
	//if (mac) {
	//	hideLayer('iframeDiv');
	//}
}

function showLayerAds (layerName) {
    self.clearTimeout(TimerID)
// *********************For Netscape 4 *********************************************
	if (ns4) {
			x = 'document.' + layerName;
			eval(x +'.visibility = "show"');
	}
// *********************For IE *****************************************************
	else if (layerRef == "document.all") {
		if (eval(layerRef + '["' + layerName + '"]')) {
			eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility ="visible"');
		}
	}
// *********************For Netscape 6 *********************************************
	else if (layerRef == "document.getElementById") {
		x = 'document.getElementById("' + layerName + '")';
		eval(x + styleSwitch +'.visibility="visible"');
	}
}


function hideLayer (layerName) {
	clearTimeout(TimerID)
// *********************For Netscape 4 *********************************************
	if (ns4) {
			x = 'document.' + layerName;
			eval(x +'.visibility = "hide"');
	}
// *********************For IE *****************************************************
	else if (layerRef == "document.all") {
		if (eval(layerRef + '["' + layerName + '"]')) {
			eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility ="hidden"');
		}
	}
// *********************For Netscape 6 *********************************************
	else if (layerRef == "document.getElementById") {
		x = 'document.getElementById("' + layerName + '")';
		eval(x + styleSwitch +'.visibility="hidden"');
	}
}

function hideAllLayers()
{
	clearTimeout(TimerID)
// *********************For Netscape 4 *********************************************
	if (ns4) {
			x = 'document.buttonLayerID66';
			eval(x +'.visibility = "hide"');
			x = 'document.buttonLayerID67';
			eval(x +'.visibility = "hide"');
			x = 'document.buttonLayerID68';
			eval(x +'.visibility = "hide"');
	}
// *********************For IE *****************************************************
	//else if (layerRef == "document.all") {
	//	if (eval(layerRef + '["' + layerName + '"]')) {
	//		eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility ="hidden"');
	//	}
	//}
// *********************For Netscape 6 *********************************************
	else if (layerRef == "document.getElementById") {

		x = 'document.getElementById("buttonLayerID66")';
		eval(x + styleSwitch +'.visibility="hidden"');
		x = 'document.getElementById("buttonLayerID67")';
		eval(x + styleSwitch +'.visibility="hidden"');
		x = 'document.getElementById("buttonLayerID68")';
		eval(x + styleSwitch +'.visibility="hidden"');
	}
}


function hideMacLayer (layerName) {
	if (mac) {
		clearTimeout(TimerID);
		// *********************For Netscape 4 *********************************************
		if (ns4) {
				x = 'document.' + layerName;
				eval(x +'.visibility = "hide"');
		}
		// *********************For IE *****************************************************
		else if (layerRef == "document.all") {
			if (eval(layerRef + '["' + layerName + '"]')) {
				eval(layerRef + '["' + layerName + '"]' + styleSwitch + '.visibility ="hidden"');
			}
		}
		// *********************For Netscape 6 *********************************************
		else if (layerRef == "document.getElementById") {
			x = 'document.getElementById("' + layerName + '")';
			eval(x + styleSwitch +'.visibility="hidden"');
		}
	}
}
//-->
