// JavaScript Document

Shadowbox.loadSkin('classic', 'src/skin');
Shadowbox.loadLanguage('en', 'src/lang');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'src/player');

window.onload = function(){

    Shadowbox.init();

    /**
     * Note: The following function call is not necessary in your own project.
     * It is only used here to set up the demonstrations on this page.
     */
	
	print_image(); /* This function will check the current page and hide or display content based on current window.location.search value. It will
					also test injavascript is enabled, if so , then it will display the rotating image area, if not it will default to the php displayed image */
	 
	
}


function setOpacity(level) 
	{
  	element.style.opacity = level;
  	element.style.MozOpacity = level;
  	element.style.KhtmlOpacity = level;
  	element.style.filter = "alpha(opacity=" + (level * 100) + ");";
	}	
var pan_duration = 300;  /* 1000 millisecond fade = 1 sec */
var pan_steps = 25;       /* number of opacity intervals   */
var pan_delay = 10000;

function fadeIn()
	{
  	for (i = 0; i <= 1; i += (1 / pan_steps))
		{
   	 	setTimeout("setOpacity(" + i + ")", i * pan_duration);
 	 	}
  	setTimeout("fadeOut()", pan_delay);
	}

function fadeOut() 
	{
  	for (i = 0; i <= 1; i += (1 / pan_steps)) 
  		{
    	setTimeout("setOpacity(" + (1 - i) + ")", i * pan_duration);
  		}
  	setTimeout("fadeIn()", pan_duration);
	}



function image_handler(site) 
	{
	document.getElementById('connector').setAttribute('href', site.name);
	if (document.getElementById) 
		{
		document.getElementById('site_imgs').setAttribute('src',  site.title);
		return false;
		}
	}

	
