//java

var isPollTwo = true;
var pollVarTwo = Math.floor(Math.random()*10)%5 + 1;

function switch_tab_two(d)
{
	var index=parseInt(d);
	if(index < 0 && index > 4)
	{
      index = 0;
	}
	
	for(var ti=0;ti<=4;ti++)
	{
		if(index==ti){
	    document.getElementById("photo"+ti).style.display = "block";
			document.getElementById("photo_menu"+ti).className = "nonce";	
		}else{
			document.getElementById("photo"+ti).style.display = "none";
			document.getElementById("photo_menu"+ti).className = "";	
		}
	}
}

function setPollTwo(v)
{
  isPollTwo=v;
}

function pollPlayTwo()
{
  if (isPollTwo)
  {
	pollVarTwo=pollVarTwo%5;
	switch_tab_two(pollVarTwo);
	pollVarTwo++;
  }
  
  setTimeout("pollPlayTwo()", 3500);
}


var isPollThree = true;
var pollVarThree = Math.floor(Math.random()*10)%6+1;

function setPollThree(v)
{
  isPollThree=v;
}

function pollPlayThree()
{
  if (isPollThree)
  {
	pollVarThree=pollVarThree%6 + 1;
	advShowNum(pollVarThree);
  }
  setTimeout("pollPlayThree()", 5000);
}

function advShowNum(num)
{
  var adv_td = document.getElementById("flashpop");
  try{
   adv_td.filters[0].Apply();
  }catch(e)
  {}
  for(var j=1; j<=6; j++)
  {
      
    var adv_tmp = document.getElementById("adv_"+j);
	var adv_num_tmp = document.getElementById("adv_num"+j);

     if (navigator.appName == "Netscape")
	 {
		 adv_tmp.style.visibility = ((j == num) ? "visible" : "hidden");
	 }else
	 {
		 adv_tmp.style.display = ((j == num)? "block" : "none");
	    
	 }
	 adv_num_tmp.style.backgroundColor=((j == num)?"#f60":"#000");
  }
 try{
 adv_td.filters[0].play();
 }catch(e){}
}
function getPageOffset(element){
	var left=0,top=0;
	 do{ 
      top+=element.offsetTop || 0; 
      left+=element.offsetLeft || 0; 
      element=element.offsetParent; 
    }while(element); 

	return {x:left,y:top};
}
