window.onscroll = callJavascript;
window.onresize = callJavascript;

function LightboxDelegate(url,caption) {
   var objLink = document.createElement('a');
   objLink.setAttribute('href',url);
   objLink.setAttribute('rel','lightbox');
   objLink.setAttribute('title',caption);
   Lightbox.prototype.start(objLink);
}

function callJavascript(){
   var myOffset = 0, myHeight = 0, myWidth = 0;

   if( typeof( window.pageYOffset ) == 'number' ) {
   //Netscape compliant
	myOffset = window.pageYOffset;
   }else if(document.body && document.body.scrollTop){
   //DOM compliant
	myOffset = document.body.scrollTop;
   }else if(document.documentElement && document.documentElement.scrollTop ){
   //IE6 standards compliant mode
	myOffset = document.documentElement.scrollTop;
   }


   if( typeof( window.innerHeight ) == 'number' ) {
   //Non-IE
	myHeight = window.innerHeight;
   }else if( document.documentElement && document.documentElement.clientHeight ){
   //IE 6+ in 'standards compliant mode'
	myHeight = document.documentElement.clientHeight;
   }else if( document.body && document.body.clientHeight){
   //IE 4 compatible
	myHeight = document.body.clientHeight;
   }else{
	myHeight = 550;
   }

   if( typeof( window.innerWidth ) == 'number' ) {
   //Non-IE
	myWidth = window.innerWidth;
   }else if( document.documentElement && document.documentElement.clientWidth ){
   //IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth;
   }else if( document.body && document.body.clientWidth){
   //IE 4 compatible
	myWidth = document.body.clientWidth;
   }else{
	myWidth = 1024;
   }

   window.document.suflash.SetVariable("pageYOffset", myOffset);
   window.document.suflash.SetVariable("innerHeight", myHeight);
   window.document.suflash.SetVariable("innerWidth", myWidth);
}

function LightboxDelegate(url,caption) {
   var objLink = document.createElement('a');
   objLink.setAttribute('href',url);
   objLink.setAttribute('rel','lightbox');
   objLink.setAttribute('title',caption);
   Lightbox.prototype.start(objLink);
}
