
var IframeId

function gup(name)
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.href);
  if(results == null)
    return "";
  else
    return results[1];
}
if (IframeId === undefined) IframeId = gup('IframeId');

var iBinPstn
var sURL = unescape(window.location.pathname);
 
function newresize()
{
//var iframe = document
try
        {
          var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
          if (innerDoc.body.offsetHeight) //ns6 syntax
          {
             iframe.height = innerDoc.body.offsetHeight + 32; //Extra height FireFox
          }
          else if (iframe.Document && iframe.Document.body.scrollHeight) //ie5+ syntax
          {
             iframe.height = iframe.Document.body.scrollHeight;
          }
        }
        catch(err)
        {
          //alert(err.message);
        }
}

function resize()
{
	
	var myframe = parent.document.getElementById(IframeId)
	var h;
	h = document.body.scrollHeight; 
	
	// sometimes the iframe does not get a chance 
	// to load in time to get the scrollheight. We
	// need to try several times to get the height.
	if(h=="0"){				
		doLoad();		
		h = document.body.scrollHeight; 				
	}
	
	if(h=="0"){		//another try
		doLoad();					
		h = document.body.scrollHeight;
	}
	if(h=="0"){		//another try		
		doLoad();					
		h = document.body.scrollHeight;
	}
	if(h=="0"){		//last try		
		doLoad();					
		h = document.body.scrollHeight;
	}
	
	parent.document.getElementById(IframeId).height = h;
		
	//get width of IFrame Body
	w = document.body.scrollWidth; 		
	if (iBinPstn == "1"){
	  try
        {
		w = parent.document.getElementById("leftBin").width;
		}
	   catch(err)
        {
          //alert(err.message);
        }
	}
	else{
	  try
        {
		w = parent.document.getElementById("RightBin").width;
		}
	   catch(err)
        {
          //alert(err.message);
        }
	}
				 
	//set width of IFrame Body
	parent.document.getElementById(IframeId).width = w;	
	IframeId = "";
	
	iBinPstn = "";

	//changeHeight(IframeId);	
	
}	

function changeHeight(id)
{
    var page_height = document.getElementById(id).contentWindow.document.body.scrollHeight;
	document.getElementById(id).height = page_height+50;
}	

function doLoad()
{
    // the timeout value should be the same as in the "refresh" meta-tag
    setTimeout( "refresh()", 1*1000 );
}

function refresh()
{
    //  This version of the refresh function will cause a new
    //  entry in the visitor's history.  It is provided for
    //  those browsers that only support JavaScript 1.0.
    //
    window.location.href = sURL;
  
}


function refresh()
{
    //  This version does NOT cause an entry in the browser's
    //  page view history.  Most browsers will always retrieve
    //  the document from the web-server whether it is already
    //  in the browsers page-cache or not.
    //  
    window.location.replace( sURL );
  
}


function refresh()
{
    //  This version of the refresh function will be invoked
    //  for browsers that support JavaScript version 1.2
    //
    
    //  The argument to the location.reload function determines
    //  if the browser should retrieve the document from the
    //  web-server.  In our example all we need to do is cause
    //  the JavaScript block in the document body to be
    //  re-evaluated.  If we needed to pull the document from
    //  the web-server again (such as where the document contents
    //  change dynamically) we would pass the argument as 'true'.
    //  
    window.location.reload( false );
   
}
