
function od_displayImage(strId, strPath, strAlt, strStyle, strClass) {	
 // receives an image id in strPath and potentially an id, alt, class and style attributes
 // if any of the id, alt, class and style attributes are not defined then they are not added to the img
 // declaration
 var ver = getVersion(); 
 if (ver == 5.5 || ver == 6)
 {
 	document.write('<img '+ ((strClass.length == 0)? '' : 'class="'+ strClass +'"') +
 	 ((strId.length == 0)? '' : 'id="'+ strId +'"') +
 	' src="Images/blank.gif" style="width:100%; height:100%; '+strStyle+'; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'DisplayImage.ashx?image=' +strPath+'&width=120&format=png\', sizingMethod=\'image\');"></img>');
 } 
 else {
    document.write('<img '+ ((strClass.length == 0)? '' : 'class="'+ strClass +'"') +
 	 ((strId.length == 0)? '' : 'id="'+ strId +'"') +
 	' src="DisplayImage.ashx?image=' +strPath+'&width=120&format=png" style="'+strStyle+'"></img>');
}
}

// Uses AlphaImageLoader filter, or the css background property,
// as appropriate, to apply a PNG or GIF as the background of the layerObject.
function od_object_setBackground(obj) {	
	 var ver = getVersion();
	 if (obj != null)
	 { 
    if (ver == 5.5 || ver == 6)
    {
		obj.layerObject.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.path+".png', sizingMethod='scale')";
	} else  {
		
	} 
	}
}

function getVersion()
      // Returns the version of Internet Explorer or a -1 if firefox or a -2 if safari
      // (indicating the use of another browser).
      {
      var rv = -1; // Return value assumes failure.



      if (navigator.appName == 'Microsoft Internet Explorer')
      {
      var ua = navigator.userAgent;
      var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
      if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
      }
      if (navigator.userAgent.indexOf("Safari")!=-1)
      {
      rv = -2;
      }



      return rv;
      }
      
      function getElementsByClassName(oElm, strTagName, strClassName){
      var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
      var arrReturnElements = new Array();
      strClassName = strClassName.replace(/\-/g, "\\-");
      var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
      var oElement;
      for(var i=0; i < arrElements.length; i++){
      oElement = arrElements[i];
      if(oRegExp.test(oElement.className)){
      arrReturnElements.push(oElement);
      }
      }
      return (arrReturnElements)
      }
      

function popUpWindow(url, height, width)
{
    var newwindow;
	newwindow=window.open(url,'name','height='+height+',width='+width+',scrollbars=1');
	if (window.focus) {newwindow.focus()}
}