function hide(id){
	var element = document.getElementById(id);
	element.style.display = 'none';
}

function view(div_id, image_id){
	var element = document.getElementById(div_id);
	var image = document.getElementById(image_id);
	element.style.display = 'block';

	// Get browser with and height
	if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth 	= window.innerWidth;
	    myHeight 	= window.innerHeight;
	    if (window.pageYOffset > 0) {
	    	ypos 	= ypos + window.pageYOffset;
	    }
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth 	= document.documentElement.clientWidth;
	    myHeight 	= document.documentElement.clientHeight;
	    if (document.documentElement.scrollTop > 0) {
	    	ypos	= ypos + document.documentElement.scrollTop;
	    }
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth 	= document.body.clientWidth;
	    myHeight 	= document.body.clientHeight;
	    if (document.documentElement.scrollTop > 0) {
	    	ypos	= ypos + document.documentElement.scrollTop;
	    }
	}

	/**
	 * Set div position
	 */
	element.style.position 		= 'absolute';
	element.style.overflow      = 'hidden';
	element.style.whiteSpace    = 'Nowrap';
	element.style.width 		= image.offsetWidth + "px";
	element.style.height		= image.offsetHeight + 20 + "px";	
	element.style.left 		    = (myWidth / 2) - (image.offsetWidth / 2) - 20 + "px";
	var ypos					= (myHeight / 2) - (image.offsetHeight / 2) - 20; 
	
	// Get browser with and height
	if( typeof( window.innerWidth ) == 'number' ) {
	    if (window.pageYOffset > 0) {
	    	ypos 	= ypos + window.pageYOffset + 18;
	    }
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    if (document.documentElement.scrollTop > 0) {
	    	ypos	= ypos + document.documentElement.scrollTop + 18;
	    }
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    if (document.documentElement.scrollTop > 0) {
	    	ypos	= ypos + document.documentElement.scrollTop + 18;
	    }
	}
	
	element.style.top     		= ypos + "px";	
  	if (ypos < 1) {
  		element.style.top = 0 + "px";
  	}
}

function submit_filter_form(id)
{
	var form = document.getElementById(id);
	form.submit();
}