<!-- // new mouseover id mouseovers

var W3CDOM = (document.createElement && document.getElementsByTagName);

var mouseOvers = new Array();
var mouseOuts = new Array();

window.onload = init;

function init()
{
	if (!W3CDOM)
	  return;
	var nav = document.getElementById('mouseovers');
	if(nav == undefined)
	  return;
	var imgs = nav.getElementsByTagName('img');
	if(imgs == undefined)
	  return;
	for (var i=0;i<imgs.length;i++)
	{
		imgs[i].onmouseover = mouseGoesOver;
		imgs[i].onmouseout = mouseGoesOut;
		var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
		mouseOuts[i] = new Image();
		mouseOuts[i].src = imgs[i].src;
		mouseOvers[i] = new Image();
		mouseOvers[i].src = imgs[i].src.substring(0,imgs[i].src.lastIndexOf('.')) + "_omo" + suffix;
		imgs[i].number = i;
	}
}

function cssjs(a,o,c1,c2){
  switch (a){
    case 'swap':
      o.className=!cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
      break;
    case 'add':
      if(!cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
      break;
    case 'remove':
      var rep=o.className.match(' '+c1)?' '+c1:c1;
      o.className=o.className.replace(rep,'');
      break;
    case 'check':
      return new RegExp("(^|\s)" + c1 + "(\s|$)").test(o.className)
      break;
  }
}

function mouseGoesOver()
{
	this.src = mouseOvers[this.number].src;
}

function mouseGoesOut()
{
	this.src = mouseOuts[this.number].src;
}

// end new mouseover






// closes child refreshes parent
function openparent (url) {
if (window.opener &&!window.opener.closed){
window.opener.location = url;
window.close();
}
}


// mouseover
function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function 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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function closeAll(){ }


function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=undefined){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}





	
//show hide content

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

function NewSwapContent(d, off, on) {
  if(d.length < 1) {
    return;
  }
  
  var obj = document.getElementById(d);
  // swap the visibility of the object.
  if(obj != null) {
    if(obj.style.display == "none") {
      obj.style.display = "block";
    }
    else {
      obj.style.display = "none";
    }
  }

  // now turn off the old one and turn on the new one.  
  if(off) {
    document.getElementById(off).style.display="none";
  }
  
  if(on) {
    document.getElementById(on).style.display="block";
  }
}

function bookmarkLinks(url, theTitle) {
	var esc = unescape(theTitle);
	
  // add del.icio.us link
  document.write('<a target="_blank" href="http://del.icio.us/post?url=' + url + '&amp;esc=' + esc + '" esc="' + theTitle + '">');
  document.write('<img src="/images/bookmark-delicious.gif" width="18" height="18" border="0" alt="Bookmark ' + theTitle + ' at del.icio.us"/></a>');
  
  // add digg.com
  document.write('<a target="_blank" href="http://digg.com/submit?phase=2&amp;url='+url+'" esc="'+theTitle+'"/>');
  document.write('<img src="/images/bookmark-digg.gif" width="18" height="18" hspace="10" border="0" alt="Digg '+theTitle+' at Digg.com"/></a>');
  
  // add reddit
  document.write('<a target="_blank" href="http://reddit.com/submit?url='+url+'&amp;esc='+esc+'" esc="'+theTitle+'"/>');
  document.write('<img src="/images/bookmark-reddit.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at reddit.com"/></a>');
  
  // add fark
  // document.write('<a target="_blank" href="http://cgi.fark.com/cgi/fark/edit.pl?new_url='+url+'&amp;new_comment='+esc+'&amp;new_link_other=&amp;linktype=Misc" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-fark.gif" width="18" height="18" border="0" alt="Fark '+theTitle+' at Fark.com"/></a>');

  // add spurl
  // document.write('<a target="_blank" href="http://www.spurl.net/spurl.php?esc='+esc+'&amp;url='+url+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-spurl.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at Spurl.net"/></a>');
  
  // add simpy
  // document.write('<a target="_blank" href="http://www.simpy.com/simpy/LinkAdd.do?href='+url+'&amp;esc='+esc+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-simpy.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at Simpy.com"/></a>');
  
  // add newsvine
  // document.write('<a target="_blank" href="http://www.newsvine.com/_tools/seed&save?u='+url+'&h='+esc+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-newsvine.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at NewsVine"/></a>');
  
  // add blinklist
  // document.write('<a target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Url='+url+'&amp;Title='+esc+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-blinklist.gif" width="18" height="18" border="0" alt="Blink this '+theTitle+' at blinklist.com"/></a>');
  
  // add furl
  // document.write('<a target="_blank" href="http://www.furl.net/storeIt.jsp?t='+esc+'&amp;u='+url+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-furl.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at Furl.net"/></a>');
  
  // add yahoo
  // document.write('<a target="_blank" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+esc+'&amp;u='+url+'" esc="'+theTitle+'"/>');
  // document.write('<img src="/images/bookmark-yahoo.gif" width="18" height="18" border="0" alt="Bookmark '+theTitle+' at YahooMyWeb"/></a>');

  
//add stumbleupon
document.write('<a target="_blank" href="http://www.stumbleupon.com/submit?url='+url+'&amp;esc='+esc+'" esc="'+theTitle+'"/>');
document.write('<img src="/images/bookmark-stumbleupon.gif" width="18" height="18" hspace="10" border="0" alt="Bookmark '+theTitle+' at reddit.com"/></a>');
 
//bookmark-facebook.gif

//bookmark-google.gif
	
}



function activateTab(id) {
  deactivateAllTabs();
  var tab = document.getElementById(id);
  if(tab != null) {
    tab.className = "tabon";
    var url = document.getElementById(id + "-url");
    if(url != null) {
      url.className = "tabon";
    }
  }
}

function deactivateTab(id) {
  var tab = document.getElementById(id);
  if(tab != null) {
    tab.className = null;
    var url = document.getElementById(id + "-url");
    if(url != null) {
      url.className = null;
    }
  }
}

function deactivateAllTabs() {
  var nav = document.getElementById("nav");
  
  var lis = nav.getElementsByTagName("li");
  for(var i = 0; i < lis.length; ++i) {
    deactivateTab(lis[i].id);
  }
}

// clear form

function doclear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = "";
     }
 }


function clearPromptFromTitle(theText) {
    if (theText.value == theText.title) {
        theText.value = "";
  }
}

function showPromptFromTitle(theText) {
    if (theText.value == "") {
        theText.value = theText.title;
  }
}

function clearPassword(theText) {
    clearPromptFromTitle(theText);
    theText.type="password";
}
  
function promptPassword(theText) {
  if (theText.value == "") {
      theText.value = theText.title;
      theText.type = "text";
  } else {
      theText.type = "password";
  }
}

// Add a drop shadow wrapper
function addDropShadow(typeClass) {
  $(typeClass).each(function (i) {
    $(this).removeAttr("width");
    $(this).removeAttr("height");
    
    // This is a workaround for IE: adding onclick to the wrapper div to make the image clickable 
    var href = $(this).parent().attr("href");
    if (href != null) {
        $(this).wrap("<div class='img-shadow img_box_cursor' onclick='document.location.href=\"" + href + "\";'></div>");
    } else {
      $(this).wrap("<div class='img-shadow'></div>");
    }
//    var extraWidth = parseInt($(this).css("padding-left")) + parseInt($(this).css("padding-right")) + 
//        parseInt($(this).css("border-left")) + parseInt($(this).css("border-right"));
//    var extraHight = parseInt($(this).css("padding-top")) + parseInt($(this).css("padding-bottom")) + 
//    parseInt($(this).css("border-top")) + parseInt($(this).css("border-bottom"));
    $(this).parent().attr("style", "width:"+(this.width + 2)+"px;height:"+(this.height + 2)+"px;");
  });
}

function sizeImageBoxes() {
  $("div.img_box").each(function (i) {
    var imageHeight = $(this).find("img").height();
    $(this).attr("style", "padding-top:"+(165-imageHeight)+"px;height:"+imageHeight+"px;")
  });
}


// -->