var $j = jQuery.noConflict();

			

function changeClass()
{
	
	if (document.getElementById("Entire_Features") )
	{
		document.getElementById("Entire_Features").setAttribute("id", "Entire_Features_Full");
		document.getElementById("expandICON").setAttribute("id", "closeICON");
		
		
		
	}
	else
	{
		document.getElementById("Entire_Features_Full").setAttribute("id", "Entire_Features");
		document.getElementById("closeICON").setAttribute("id", "expandICON");
	}
}

function changeTranslate()
{
	
	if (document.getElementById("myTranslator_Off") )
	{
		document.getElementById("myTranslator_Off").setAttribute("id", "myTranslator_On");
		TB_position();
		document.getElementById("fade").style.background = "#000";
		document.getElementById("fade").style.opacity = "0.4";
		/* document.getElementById("fade").style.-moz-opacity = "0.4"; */
		document.getElementById("fade").style.filter = "alpha(opacity=40)";
	}
	else
	{
		document.getElementById("myTranslator_On").setAttribute("id", "myTranslator_Off");
	}
}

var TB_NextObjToShow, TB_NextDirection, TB_WIDTH = 0, TB_HEIGHT = 0, TB_VisibleSelects, TB_WasOpen;


function TB_position() {
	var pagesize = getPageSize();
  
  	if (window.innerHeight && window.scrollMaxY) {	
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll = document.body.offsetHeight;
  	}
	
	var arrayPageScroll = getPageScrollTop();
	
	//$j("#myTranslator_On").css({width:TB_WIDTH+"px",height:TB_HEIGHT+"px",
	$j({left: ((pagesize[0] - TB_WIDTH)/2)+"px", top: (arrayPageScroll[1] + ((pagesize[1]-TB_HEIGHT)/2))+"px" });
	$j("#fade").css("height",yScroll +"px");
}

function getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
	
	arrayPageSize = new Array(w,h) 
	return arrayPageSize;
}

function getPageScrollTop(){
	var yScrolltop;
	if (self.pageYOffset) {
		yScrolltop = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScrolltop = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScrolltop = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScrolltop) 
	return arrayPageScroll;
}
