/*
     My Cross Browser Javascript
     ===========================
*/

function MyCntrlObj()
    {
             this.BackButtonFlag = true;
             this.StartSculptureIndx = 0;
             this.HelpSculptureIndx = 0;
             this.HelpSculptureCachIndx = 0;
             this.RequestNewInfoPage = null;

             this.SculptureRequestIndx = 0;
             this.PictureRequestIndx = 0;
             this.FotoRequestIndx = 0;
             this.ActiveDynImag = null;
             this.ActSculptureImageArray = null;

             this.MyDynImag = null;
             this.MyDynImag_length = 0;

             this.MyFotoArray = null;
             this.MyFotoArray_length = 0;

             this.MyPictureArray = null;
             this.MyPictureArray_length = 0;
             
             this.MyFotos = null;
             this.MyFotos_length = 0;

             this.ImageNumber = 0;
             this.LastDynImageIndx = 0;
             this.ImageLoadCount = 0;
             this.ImageLoadNumber = 0;

             this.ViewermarginA = 36;
             this.ViewermarginB = 5;
             this.MouseMargin = 5;

             this.startFlag = 0;
             this.startSyncFlag = 0;
             this.idle= true;

             this.Index = null;
             this.Index_ReadyFlag = 0;
             this.Panel = null;
             this.Panel_ReadyFlag = 0;
             this.VFrame = null;
             this.Viewer = null;
             this.Viewer_ReadyFlag = 0;
             this.Viewer_ButtonState = 0;
             this.ViewerInfo = null;
             this.ViewerInfoLayer = null;
             this.ViewerInfo_ReadyFlag = 0;
             this.LoadComplete = false;
             this.InfoRSLayerReadyFlag = 0;
             this.RequestCloseCurtain = false;
             this.CurtainStatus = "C";
             this.InfoTextXCenter = 0;
             this.InfoTextX = 0;
             this.InfoTextY = 0;
             this.InfoTextWidth = 0;
             this.TextMessageContainer = null;
             
             this.pictureViewer = new Array;
             this.pictureViewerLayer = new Array;
             this.pictureViewerIndex =0;

             this.FotoViewerLayerCover = null;
             this.FotoViewerLayer = new Array;
             this.FotoViewerIndex = 0;
             this.FotoViewerHeight = 20;
             this.FotoViewerBackground = "#ffffff";
             this.FotoViewerMode = "F";
             this.ViewerSwitch = "A";
             this.StopFotoSlideShow = true;
             this.FotoSlideShowON = false;
             
             this.SculptureViewerIndex = 0;
             this.SculptureViewerSwitch = "A";
             this.SculptureSlideShowON = false;
             this.StopSculptureSlideShow = true;

             this.UBC = null;
             this.UBCev = null;

             this.ArtProjects = SculptureData.ArtProjects;
             this.RalfenSteinProjects = RalfenSteinData.RalfenSteinProjects;
             this.PictureProjects = PictureData.PictureProjects;
             this.FotoProjects = FotoData.FotoProjects;
             this.TLinie = null;
             
             this.InfoLayerReadyFlag = "W"
             this.UrlRequest = null;
             this.SlideshowTmer = null;
             this.ActiveInfoItem = "Navigation.html";
             
             this.MainLoadTime = null;
             this.PictureLoadTime = null;
             this.FotoLoadTime = null;
             this.ProfilLoadTime = null;
             this.SculptureLoadTime = null;
             this.RotationFadeReady = false;
    }
    
    

              
function LoadPerformance()
{ 
      this.start = new Date();
      this.end = null;
      this.loadTime = null;
}

LoadPerformance.prototype.EndTest = function()
{      
      this.end = new Date();
      this.loadTime = this.end.getTime() - this.start.getTime();
      
      return this.loadTime;
}

function getImageByIdW3C( ID ) {return( document.getElementById( ID));}
function getImageByIdMSIE6( ID ) {return( document.getElementById( ID + "SP" ));}
function StyleGetLeft(Obj) {return( (Obj.style.left == "") ? 0 : parseInt( Obj.style.left));}
function StyleGetTop(Obj) {return( (Obj.style.top == "") ? 0 : parseInt( Obj.style.top));}
function StyleGetWidth(Obj) {return( parseInt( Obj.style.width));}
function StyleGetHeight(Obj) {return( parseInt( Obj.style.height));}
function getInnerWindowWidthIE1( Obj ) {return( Obj.document.body.clientWidth );}
function getInnerWindowHeightIE1( Obj ){return( Obj.document.body.clientHeight );}
function getInnerWindowWidthIE2( Obj ) {return( Obj.document.documentElement.clientWidth );}
function getInnerWindowHeightIE2( Obj ){return( Obj.document.documentElement.clientHeight );}
function getInnerWindowWidthIE3( Obj ) {return( document.getElementsByTagName('body')[0].clientWidth );}
function getInnerWindowHeightIE3( Obj ){return( document.getElementsByTagName('body')[0].clientHeight );}
function getInnerWindowWidthFF( Obj ){return( Obj.innerWidth );}
function getInnerWindowHeightFF( Obj ){return(  Obj.innerHeight );}
function getNaturalImageWidthTrue( image ){return( image.naturalWidth);}
function getNaturalImageHeightTrue( image ){return( image.naturalHeight);}
function getNaturalImageWidthFake( image ){return( image.width);}
function getNaturalImageHeightFake( image ){return( image.height);}
function getNaturalImageWidthMSIE6( obj ){return((obj.tagName == "IMG" )? obj.width : parseInt( obj.style.width));}
function getNaturalImageHeightMSIE6( obj ){return((obj.tagName == "IMG" )? obj.height :  parseInt( obj.style.height));}
function getImageWidthMSIE6( obj ){return((obj.tagName == "IMG" )? obj.width :  parseInt( obj.style.width));}
function getImageHeightMSIE6( obj ){return((obj.tagName == "IMG" )? obj.height : parseInt( obj.style.height));}
function getImageWidthW3C( image ){return( image.width);}
function getImageHeightW3C( image ){return( image.height);}
function setImageWidthMSIE6( obj, width ){obj.style.width = width + "px";}
function setImageHeightMSIE6( obj, height ){obj.style.height = height + "px";}
function setImageWidthW3C( obj, width ){obj.width = width;}
function setImageHeightW3C( obj, height ){obj.height = height;}
function MyAddEventListenerW3C(obj, eventType, func, useCaption){ obj.addEventListener(eventType, func, useCaption); return true;}
function MyAddEventListenerMSIE(obj, eventType, func, useCaption){ var retVal = obj.attachEvent("on" + eventType, func ); return retVal;}
function MyRemoveEventListenerW3C(obj, eventType, func, useCaption){ obj.removeEventListener(eventType, func, useCaption); return true;}
function MyRemoveEventListenerMSIE(obj, eventType, func, useCaption){ var retVal = obj.detachEvent("on" + eventType, func ); return retVal;}
function GetStyleOpacityW3C( obj ){return( ( obj.style.opacity == "")? 0.: parseFloat( obj.style.opacity ))}
function GetStyleOpacityMSIE( obj ){ var vstr = obj.style.filter; return( parseFloat( vstr.substring( (1 + vstr.indexOf('=')), vstr.length )) / 100 );}
function SetStyleOpacityW3C( obj, opacity ){ obj.style.opacity = opacity; }
function SetStyleOpacityMSIE( obj, opacity ){ obj.style.filter = "alpha(opacity="+(100*opacity)+")";}
function GetEventRangeParentW3C( e ){return( e.rangeParent);}
function GetEventRangeParentMSIE( e ){return( e.srcElement);}
function GetEventCurrentTargetMSIE( e ){return( e.srcElement);}
function GetEventCurrentTargetW3C( e ){return( e.currentTarget);}
function GetEventTargetW3C( e ){return( e.target);}
function GetEventTargetW3CSafari( e ){return( (e.target.nodeType == 3)? e.target.parentNode : e.target );}
function GetEventTargetMSIE( e ){return( e.srcElement);}
function GetEventPageXW3C( e ){ return ( e.pageX );}
function GetEventPageXMSIE( e ){ return( e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft );}
function GetEventPageYW3C( e ){ return ( e.pageY );}
function GetEventPageYMSIE( e ){ return( e.clientY + document.body.scrollTop + document.documentElement.scrollTop );}
function GetEventLayerXW3C( e ){ return ( e.layerX );}
function GetEventLayerXMSIE( e ){ return( e.offsetX );}
function GetEventLayerYW3C( e ){ return ( e.layerY );}
function GetEventLayerYMSIE( e ){ return( e.offsetY );}
function PreventDefaultW3C( e ){ e.preventDefault();}
function PreventDefaultMSIE( e ){ e.returnValue = false;}
function setMyNativeWidth( obj, w){ if ( obj.NativeWidth ) return false; obj.NativeWidth = w; return true;} 
function getMyNativeWidth( obj ){if ( obj.NativeWidth ) return( obj.NativeWidth); else return( -1 );}
function setMyNativeHeight( obj, h){ if ( obj.NativeHeight ) return false; obj.NativeHeight = h; return true;}
function getMyNativeHeight( obj ){if ( obj.NativeHeight ) return( obj.NativeHeight); else return( -1 );}


function UniBrowserCode( browserdata, image, obj )
{
     this.browserdata = browserdata;
     
     
     if ( window && window.innerWidth )
     {
			this.getInnerWidth = getInnerWindowWidthFF;
			this.getInnerHeight = getInnerWindowHeightFF;
	 }
     else if (window && window.document && window.document.body && window.document.body.clientHeight )
     {
			this.getInnerWidth = getInnerWindowWidthIE1;
			this.getInnerHeight = getInnerWindowHeightIE1;
     }
     else if (window && window.document && window.document.documentElement && window.document.documentElement.clientHeight )
     {
			this.getInnerWidth = getInnerWindowWidthIE2;
			this.getInnerHeight = getInnerWindowHeightIE2;
     }
     else if (document && document.getElementsByTagName && document.getElementsByTagName('body')[0] && document.getElementsByTagName('body')[0].clientHeight )
     {
            this.getInnerWidth = getInnerWindowWidthIE3;
			this.getInnerHeight = getInnerWindowHeightIE3;
     }
     
     
     if ( image.naturalWidth)
     {
			this.getNaturalWidth = getNaturalImageWidthTrue;
			this.getNaturalHeight = getNaturalImageHeightTrue;
	 }
	 else
	 {
		    this.getNaturalWidth = getNaturalImageWidthFake;
			this.getNaturalHeight = getNaturalImageHeightFake; 
	 }
	 
	 if ( browserdata.browser == "Explorer" && 
          browserdata.version < 8 )
     {
		    this.getImageWidth = getImageWidthMSIE6;
		    this.getImageHeight = getImageHeightMSIE6;
		    this.setImageWidth = setImageWidthMSIE6;
		    this.setImageHeight = setImageHeightMSIE6;
		    this.getNaturalWidth = getNaturalImageWidthMSIE6;
			this.getNaturalHeight = getNaturalImageHeightMSIE6; 
			
			this.getImageById = getImageByIdMSIE6;   
     }
     else
     {
		    this.getImageWidth = getImageWidthW3C;
		    this.getImageHeight = getImageHeightW3C;
		    this.setImageWidth = setImageWidthW3C;
		    this.setImageHeight = setImageHeightW3C;
			
			this.getImageById = document.getElementById;       
     }
     
	 if ( obj.addEventListener)
	 {
	        this.addEventListener = MyAddEventListenerW3C;
	        this.removeEventListener = MyRemoveEventListenerW3C;
	        this.setStyleOpacity = SetStyleOpacityW3C;
	        this.getStyleOpacity = GetStyleOpacityW3C;
	 }
	 else if (obj.attachEvent) 
	 {
		    this.addEventListener = MyAddEventListenerMSIE;
		    this.removeEventListener = MyRemoveEventListenerMSIE;
	        this.setStyleOpacity = SetStyleOpacityMSIE;
	        this.getStyleOpacity = GetStyleOpacityMSIE;    
	 }
	 
	 this.setNativeWidth = setMyNativeWidth;
	 this.getNativeWidth = getMyNativeWidth;
	 this.setNativeHeight = setMyNativeHeight;
	 this.getNativeHeight = getMyNativeHeight;
	 
}

function UniBrowserEventCode( ev, MyUBC )
{
       this.status = 0;
       
       if ( ev.target )
       {    
             this.status += 1000;
		     if ( MyUBC.browserdata.browser == "Safari" )
		        this.getEventTarget = GetEventTargetW3CSafari;
		     else
		        this.getEventTarget = GetEventTargetW3C;
		        
             this.getRangeParent =  GetEventRangeParentW3C;
             this.getCurrentTarget =  GetEventCurrentTargetW3C;
	     }
       else if ( ev.srcElement )
       {   
             this.status += 1000;
			 this.getEventTarget = GetEventTargetMSIE;
			 this.getRangeParent = GetEventRangeParentMSIE;
             this.getCurrentTarget =  GetEventCurrentTargetMSIE;
	     }
	   if ( ev.pageX )
	   {   
          this.status += 100;
		  this.getPageX = GetEventPageXW3C;
		  this.getPageY = GetEventPageYW3C;
	   }  
	   else if ( ev.clientX )
	   {   
          this.status += 100;
		  this.getPageX = GetEventPageXMSIE;
		  this.getPageY = GetEventPageYMSIE;
	   }
	   	
	   if ( ev.layerX )
	   {  
          this.status += 10;
		  this.getLayerX = GetEventLayerXW3C;
		  this.getLayerY = GetEventLayerYW3C;
	   }  
	   else if ( ev.offsetX )
	   {  
          this.status += 10;
		  this.getLayerX = GetEventLayerXMSIE;
		  this.getLayerY = GetEventLayerYMSIE;
	   }  
	   else if ( ev.clientX )
	   {   
          this.status += 10;
		  this.getLayerX = GetEventLayerXMSIE;
		  this.getLayerY = GetEventLayerYMSIE;
	   }
	   
	   if ( !ev.preventDefault )
	   {  
	      this.status += 1;
	      this.PreventDefault = PreventDefaultMSIE;
	   }
	   else
	   {   
	       this.status += 1;
		   this.PreventDefault = PreventDefaultW3C;
	   }
	   
	   this.UBC = MyUBC;
}

function UpdateUniBrowserEventCode( InData, ev, MyUBC )
{
       if ( InData == null ) return;
          
       if ( !InData.getEventTarget )
       {
          if ( ev.target )
          {    
              this.status += 1000;
		      if ( MyUBC.browserdata.browser == "Safari" )
		         InData.getEventTarget = GetEventTargetW3CSafari;
		      else
		         InData.getEventTarget = GetEventTargetW3C;
		        
              InData.getRangeParent =  GetEventRangeParentW3C;
              InData.getCurrentTarget =  GetEventCurrentTargetW3C;
	       }
           else if ( ev.srcElement )
           {   
               this.status += 1000;
			   InData.getEventTarget = GetEventTargetMSIE;
			   InData.getRangeParent = GetEventRangeParentMSIE;
               InData.getCurrentTarget =  GetEventCurrentTargetMSIE;
	       }
	   }
	   
	   if ( !InData.getPageX )
	   {
	      if ( ev.pageX )
	      {   
             this.status += 100;
		     InData.getPageX = GetEventPageXW3C;
		     InData.getPageY = GetEventPageYW3C;
	      }  
	      else if ( ev.clientX )
	      {   
             this.status += 100;
		     InData.getPageX = GetEventPageXMSIE;
		     InData.getPageY = GetEventPageYMSIE;
	      }
	   }
	   
	   if (	!InData.getLayerX )
	   {
	      if ( ev.layerX )
	      {   
             this.status += 10;
		     InData.getLayerX = GetEventLayerXW3C;
		     InData.getLayerY = GetEventLayerYW3C;
	      }  
	      else if ( ev.offsetX )
	      {   
             this.status += 10;
		     InData.getLayerX = GetEventLayerXMSIE;
		     InData.getLayerY = GetEventLayerYMSIE;
	      }  
	      else if ( ev.clientX )
	      {   
             this.status += 10;
		     InData.getLayerX = GetEventLayerXMSIE;
		     InData.getLayerY = GetEventLayerYMSIE;
		  }
	   }
	   
	   if ( !InData.PreventDefault )
	   {
	      if ( !ev.preventDefault )
	      {
	         this.status += 1;
	         InData.PreventDefault = PreventDefaultMSIE;
	      }
	      else
	      {
	         this.status += 1;
		     InData.PreventDefault = PreventDefaultW3C;
		  }
	   }
	   
	   InData.UBC = MyUBC;
}


function ParseParameter( cmd )
{
        
        var indx1, indx2, indx3, Cmnd;
        
        this.CmndFC = null;
        this.FrameCmd =  null;
        this.FrameStartItem = null;
        this.HelpCmd = null;
        this.MFrameCmd = null;
        this.FrameOption = null;
        this.SculptureSlideShow = false;
        this.Presentation = false;
        this.SlideshowComplete = false;
              
        indx1 = cmd.indexOf("?");
        if ( indx1 > -1 )
        {  
             Cmnd = cmd.substring( indx1 + 1);
             indx2 = Cmnd.indexOf(".");
             if ( indx2 > -1 )
             {
                  this.CmndFC = Cmnd.substring( 0, indx2 );
                  Cmnd = Cmnd.substring( indx2 + 1 );
                  indx3 = Cmnd.indexOf(".");
                  if ( indx3 > -1 )
                  {
                        this.FrameStartItem = Cmnd.substring( 0, indx3 );
                        this.HelpCmd = Cmnd.substring( indx3 + 1 );
                  }
                  else
                        this.FrameStartItem = Cmnd;
             }
             else
                  this.CmndFC = Cmnd;
        }
           
        if ( this.CmndFC )
        {     
             if ( StrCmp( this.CmndFC, "RalfenStein"))                                                 
                   this.FrameCmd = "RalfenSteinViewerPanel.html";
             else if ( StrCmp( this.CmndFC, "Sculptures"))
                   this.FrameCmd = "SculptureViewerPanel.html";
             else if ( StrCmp( this.CmndFC, "Pictures"))
                   this.FrameCmd = "PictureViewerPanel.html";
             else if ( StrCmp( this.CmndFC, "Fotos"))
                   this.FrameCmd = "FotoViewerPanel.html";
             else if ( StrCmp( this.CmndFC, "Presentation"))
             {
                   this.FrameCmd = "SculptureViewerPanel.html";
                   this.FrameOption = null;
                   this.MFrameCmd = null;
                   this.Presentation = true;
                   return;
              }     
        }
        if ( this.FrameStartItem )
        {     
             if ( StrCmp( this.FrameStartItem, "Profile"))                                                 
                   this.FrameOption = "RS-RSch.html";
             else if ( StrCmp( this.FrameStartItem, "Projects"))
                   this.FrameOption = "RS-Projekte.html";
             else if ( StrCmp( this.FrameStartItem, "Stations"))
                   this.FrameOption = "RS-Stationen.html";
             else if ( StrCmp( this.FrameStartItem, "Scope"))
                   this.FrameOption = "RS-Arbeitsfelder.html";
        }   
        if ( this.HelpCmd )
        {     
             if ( StrCmp( this.HelpCmd, "Sculptures"))                                                 
                   this.MFrameCmd = "H-Skulpturen.html";
             else if ( StrCmp( this.HelpCmd, "Pictures"))
                   this.MFrameCmd = "H-Bilder.html";
             else if ( StrCmp( this.HelpCmd, "Fotos"))
                   this.MFrameCmd = "H-Fotografie.html";
             else if ( StrCmp( this.HelpCmd, "Art"))
                   this.MFrameCmd = "H-Kunst.html";
             else if ( StrCmp( this.HelpCmd, "Navigation"))
                   this.MFrameCmd = "H-Navigation.html";
             else if ( StrCmp( this.HelpCmd, "Display"))
                   this.MFrameCmd = "H-Anzeige.html";
             else if ( StrCmp( this.HelpCmd, "Email"))
                   this.MFrameCmd = "EMailForm.html";
             else if ( StrCmp( this.HelpCmd, "Impressum"))
                   this.MFrameCmd = "Impressum.html";
             else if ( StrCmp( this.HelpCmd, "Contact"))
                   this.MFrameCmd = "Kontakt.html";
             else if ( StrCmp( this.HelpCmd, "Links"))
                   this.MFrameCmd = "Links.html";
        } 
} 


function CheckUBCev( event )
{
     if ( !CntrlObj.UBCev )
     {
		CntrlObj.UBCev = new UniBrowserEventCode( event, CntrlObj.UBC );
	    return( CntrlObj.UBCev );
     }
     
     if ( CntrlObj.UBCev.status < 1111 )
        UpdateUniBrowserEventCode( CntrlObj.UBCev, event, CntrlObj.UBC );
     
     return( CntrlObj.UBCev );
}


var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.family = this.searchfamily(this.dataBrowser) || this.browser;
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i< data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchfamily: function (data) {
		for (var i=0;i< data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].family;
			}
			else if (dataProp)
				return data[i].family;
			}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror",
			family: "Mozilla"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox",
			family: "Mozilla"
		},
		{
			string: navigator.userAgent,
			subString: "AppleWebKit",
			identity: "Chrome",
			family: "Mozilla"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino",
			family: "Mozilla"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape",
			family: "Mozilla"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE",
			family: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv",
			family: "Mozilla"
		},
		{ 	// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla",
			family: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};

function correctPng( imgID ) // correctly handle PNG transparency in Win IE 5.5 or higher.
{
      var img = document.getElementById( imgID );
      var imgStyle = "display:inline-block;" + img.style.cssText ;
      
      if (img.align == "left") imgStyle = "float:left;" + imgStyle;
      if (img.align == "right") imgStyle = "float:right;" + imgStyle;
      if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
      
      var strNewHTML = "<span id='" + imgID +"'"
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"&gt;&lt;/span>"; 
         
      img.outerHTML = strNewHTML;
      img.id = img.id + "old";
}

function correctPngDivBackground( name )
{
       var MyObj;
       
       MyObj = document.getElementById( name );
       MyObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader";
}

function MyDoNothing()
{
        return false;
}

function StrCmp(str1, str2)
{
    var slen, longstr, indx;
    
    if ( str1.charCodeAt(0) != str2.charCodeAt(0)) return false;
    
    if ( str1.length < str2.length )
    {
         slen = str1.length - 1;
         longstr = str2;
    }
    else
    {
         slen = str2.length - 1;
         longstr = str1;
    }
    
    if ( str1.charCodeAt( slen ) != str2.charCodeAt( slen )) return false;
    if ( str1.substr( 1, slen ) != str1.substr( 1, slen )) return false;

    if ( slen == longstr.length -1 ) return true;
    
    for ( indx = slen; indx < longstr.length; indx++ )
         if ( longstr.charCodeAt( indx ) > 32 ) return false;
         
    return true;
}


function ShowPDF( PDF_File )
{
        var MyObj;
        
        MyObj = window.open( PDF_File, "popUp");
        MyObj.focus();
}
 
