var INTERFACE_JS = 1
function getFullOffset( posObj )
 {
  var ObjXY=new Object;
   ObjXY.x=0
   ObjXY.y=0
   
   while( posObj.tagName.toLowerCase()!="body" )
    {
     ObjXY.x+=posObj.offsetLeft;
     ObjXY.y+=posObj.offsetTop;
     posObj=posObj.offsetParent;
    }
  return ObjXY;
 }
//returns an object with properties X pixel resolution an Y pixel resolution
function getScreenResolution(screenObj) //should be deleted. func getWindowSize do the same.
{
 var obj=new Object()
// try
// { 
  if(window.navigator.appName == "Microsoft Internet Explorer")   
  { 
   if(screenObj==null) screenObj = parent.document.body
   obj.X = screenObj.document.body.offsetWidth - 4; //4px = browser thin border. scroll bars leave out of acount
   obj.Y = screenObj.document.body.offsetHeight - 51 - 4
  }
  else //Netscape
  { 
   if(screenObj==null) screenObj = parent
   obj.X = screenObj.innerWidth
   obj.Y = screenObj.innerHeight - 51
  }
/*
 }
 catch(e)
 {
  obj.X=0
  obj.Y=0
 }
*/
 obj.x=obj.X
 obj.y=obj.Y

 return obj
}
/***************************************************************/
/* some CSS manipulation functions (Not tested with NN)        */
/***************************************************************/
/*   document.styleSheets[].Rules[].style.cssProp              */
/***************************************************************/
 
 function getCssProp(ruleName, propName)
  {
   if(String(ruleName)=="" || String(propName)=="") return "";
   var cssRules, cssCollection=document.styleSheets
   ruleName=ruleName.toLowerCase()
   // dda: full match must take place. otherwise listItem matches disabled list item
   re = new RegExp( "\." + ruleName + "$")
   
   for(var i=0; i < cssCollection.length; i++)
   {
    //cssRules=cssCollection[i].rules;
    for(var j=0; j < cssCollection[i].rules.length; j++){
     
     if((cssCollection[i].rules[j].selectorText.toLowerCase()).search( re )!=-1)
       return eval("cssCollection[i].rules[j].style."+propName);
    }
   }
  }
   // this function is much quickly to perform
 function getCssPropByCssId(cssId, ruleName, propName)
 {
   try
   {
    var oCss=getCss(cssId)
    if( oCss!=null )
    {
        var oRules=oCss.rules
        if(oRules!=null)
        {
            var oRule=getCssRule(oRules, ruleName.toLowerCase())
            if(oRule!=null)
                return getRuleProp(oRule,propName)
        }
    }
   }
   catch(e){;}
  return "";
 }

 function getCss(cssId)
 {
    return document.styleSheets(cssId)
 }
 function getCssRule(objRules,name)
 {
    for(var i=0;i<objRules.length;i++)
        if((objRules[i].selectorText.toLowerCase()).search(name)!=-1) return objRules[i]
    return null;
 }
 function getRuleProp(oRule,propName)
 {
    return eval("oRule.style."+propName)
 } 

function getWindowSize(objWnd)
{
    var objRes = new Object();
    objRes.X = (objWnd.navigator.appName == "Netscape") ? objWnd.innerWidth : objWnd.document.body.clientWidth;
    objRes.Y = (objWnd.navigator.appName == "Netscape") ? objWnd.innerHeight : objWnd.document.body.clientHeight;
    objRes.x = objRes.X;
    objRes.y = objRes.Y;
    return objRes;
}

function ResizeDiv()
{ 


  var oDiv = document.getElementById('oJobsList');
  var nToolBarHeight = 30;
  var nFrameHeight = 0;


  if ( browser() == safari ) {

    nFrameHeight = window.innerHeight - 30
    oDiv.style.width = window.innerWidth - 20

    
    oDiv.style.overflow = "scroll"


  }
  else {
        nFrameHeight = window.document.body.clientHeight;
  }
        
  if ( oDiv != null && nFrameHeight > nToolBarHeight ){ 
      oDiv.style.height = parseInt( nFrameHeight ) - nToolBarHeight;
  }


    if ( window.navigator.platform == "MacPPC" && browser() == ie )
    {
      try{
      oDiv.style.overflow = "auto";
      oDiv.style.paddingRight = "20px";
      oDiv.style.paddingBottom = "20px";
      }
      catch(e)
      { ; };
    }   

}
