//is it a IE browser
tt_n = navigator.userAgent.toLowerCase(),
tt_nv = navigator.appVersion;
tt_ie6 = false;
// Browser flags
if ( parseFloat(tt_nv.substring(tt_nv.indexOf("MSIE")+5)) >= 5.5 && parseFloat(tt_nv.substring(tt_nv.indexOf("MSIE")+5)) < 9)
	tt_ie6 = true; 



if (tt_ie6) {
	if (document.getElementById("hall"))
		document.getElementById("hall").style.position  = "absolute";
			
}




	function setBG() {
		
		var iLeft=document.getElementById("iLeft");
		var iRight=document.getElementById("iRight");
		
		iLeft.style.height=0;
		iRight.style.height=0;		
		
		var iWidth = getPageWidth()/5;
		iLeft.style.width=iWidth;
		iLeft.style.height= getPageHeight();
		iRight.style.width=iWidth;
		iRight.style.height= getPageHeight();
		
		 
	}
	window.onresize = setBG; 



//calls the getPageSizeWithScroll() fuction and returns only the height value;
function getPageHeight() {
	pageSize = getPageSizeWithScroll();
	return pageSize[1];
	
}

//calls the getPageSizeWithScroll() fuction and returns only the width value;
function getPageWidth() {
	pageSize = getPageSizeWithScroll();
	return pageSize[0];
	
}

/* calculates the page width and height, and returns it in the form of an array where
*  the first element in the array is the width and the second is the hieght;
*
*/  
function getPageSizeWithScroll(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );
	return arrayPageSizeWithScroll;
}

    dojo.require("dojo.widget.FisheyeList");
    dojo.hostenv.writeIncludes();
	
function selectCategory(module, actName){
  	var url;
  	//if (catname == 'All' ) {
    //	url="$url.home"
  	//} else {
    //	url="${url.home}category/"+catname
  	//}
	window.location
	url = "index.php?module=" + module + "&action=" + actName;
	
  	window.location.replace ( url );
}


	function changeScrollbarColor(){
		if (document.all){
			document.body.style.scrollbarBaseColor = "black";
		}
	}

	function menuImgSwitch(obj, imgState) {
		
		lastDot = (obj.src).indexOf('.',30);
		
		if ( imgState != 'on') {
			obj.src = (obj.src).substring(0,lastDot - 3) + (obj.src).substring(lastDot);
		}
		else {
			obj.src = (obj.src).substring(0,lastDot) + '_on' + (obj.src).substring(lastDot);
		}
	}

