	
	function redrawFlash(divtagname,obHeight,obWidth){
		document.getElementById(divtagname).width=obWidth + "px;";
		document.getElementById(divtagname).height=obHeight + "px;";
	}	
	
	function swapImage(href) {
		var flash =  document.getElementById("flash_content");
		flash.imageLoad(href,false);
		document.getElementById("content").style.visibility = "visible";
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			document.getElementById("_content").style.visibility = "visible";
		}
		if (com.asual.util.Browser.isIE()) {
			var property = _content.filters ? 'filter' : 'opacity';
    		_content.style[property] = _content.filters ? 'alpha(opacity=' + 90 + ')' : 0.9;
		}
	}
	
	function swapToGallery(href) {
		var flash =  document.getElementById("flash_content");
		flash.imageLoad(href,true);
		document.getElementById("content").style.visibility = "hidden";
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			document.getElementById("_content").style.visibility = "hidden";
		}
		if (com.asual.util.Browser.isIE()) {
			var property = _content.filters ? 'filter' : 'opacity';
    		_content.style[property] = _content.filters ? 'alpha(opacity=' + 90 + ')' : 0.9;
		}
	}
	
	function minimiseMaximise(){
		document.getElementById("content").style.visibility = "hidden";
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			document.getElementById("_content").style.visibility = "hidden";
		}
		/*
		var wHeight = getHeight();
		
		if (wHeight<1001){
			wHeight = 1001;
		}
		
		if (document.getElementById("content").style.height == "30px"){
			document.getElementById("content").style.height = Math.round(wHeight-180) + "px";
		}
		else{
			document.getElementById("content").style.height = "30px";
		}
		
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			if (document.getElementById("_content").style.height == "30px"){
				document.getElementById("_content").style.height = Math.round(wHeight-180) + "px";
			}
			else{
				document.getElementById("_content").style.height = "30px";
			}
		}
		*/
	}
	
	function superDraw(){
		var wWide = getWidth();
		var wHeight = getHeight();
		var leave = false;
		var leftindent = 0;
		var divWidth = 801;
		
		if (wWide<1001){
			wWide = 1001;
		}
		
		if (wHeight<701){
			wHeight = 701;
		}
		document.getElementById("content").style.visibility = "visible";
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			document.getElementById("_content").style.visibility = "visible";
		}
		if (document.getElementById("content").style.height == "30px") leave = true;
		
		if (document.getElementById("_content") == undefined){	} else{
			if (document.getElementById("_content").style.height == "30px") leave = true;
		}
	
		//alert("wHeight" + wHeight + " wWide" + wWide);
		//redrawFlash("flash_content", Math.round(wHeight), Math.round(wWide));
		redrawFlash("flash_content", wHeight, 200);
		document.getElementById("flash_content").style.width = Math.round(wWide) + "px";
		document.getElementById("toplayer").style.width = Math.round(wWide) + "px";
		  leftIndent = Math.round((wWide)/2)-Math.round(divWidth/2);
		  document.getElementById("content").style.left = Math.round(leftIndent) + "px";
		  document.getElementById("content").style.width = Math.round(divWidth) + "px";
		//document.getElementById("content").style.left = Math.round(150) + "px";
		//document.getElementById("content").style.width = Math.round(wWide-300) + "px";
		if (!leave) document.getElementById("content").style.height = Math.round(wHeight-200) + "px";
		document.getElementById("content").style.top = Math.round(125) + "px";
		if (document.getElementById("_content") == undefined){
			///
		}
		else{
			if (!leave) document.getElementById("_content").style.height = Math.round(wHeight-200) + "px";
			document.getElementById("_content").style.top = Math.round(125) + "px";
			//document.getElementById("_content").style.left = Math.round(150) + "px";
			//document.getElementById("_content").style.width = Math.round(wWide-300) + "px";
			  document.getElementById("_content").style.left = Math.round(leftIndent) + "px";
			  document.getElementById("_content").style.width = Math.round(divWidth) + "px";
	    }
	}		

	
	function getHeight() {
		var myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myHeight = window.innerHeight;
		} 
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myHeight = document.documentElement.clientHeight;
		} 
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myHeight = document.body.clientHeight;
		}
		return myHeight;
	}
	
	function getWidth() {
		var myWidth = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
		} 
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
		} 
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
		}
		return myWidth;
	}