﻿
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}

function IEHoverPseudo() 
{ 
 var navItems = document.getElementById("primary-nav").getElementsByTagName("li"); 

 for (var i=0; i<navItems.length; i++) { 
  if(navItems[i].className == "menuparent") { 
   navItems[i].onmouseover=function() { this.className += " over";} 
   navItems[i].onmouseout=function() { this.className = "menuparent"; } 
  } 
 } 
}


function GetAbsoluteLeft(obj)
{
    var objLeft = obj.offsetLeft;

    while(obj.offsetParent)
    {
        objLeft += obj.offsetParent.offsetLeft;
        obj = obj.offsetParent;
    }
    return objLeft;

}
  
function GetAbsoluteTop(obj)
{
    var objTop = obj.offsetTop;
    while(obj.offsetParent)
    {
        objTop += obj.offsetParent.offsetTop;
        obj = obj.offsetParent;
    }
    
    return objTop;
}

function ShowUnderline(obj)
{
    obj.style.textDecoration = "underline";
}

function HideUnderline(obj)
{
    obj.style.textDecoration = "none";
}


