function go( location ){
	document.location.href=location;
}
function maximize_picture( path ){
	open_picture( path );
}
var picture = new Image();
picture.onload = function(){
	picture_width = this.width;
	picture_height = this.height;
	var o1 =  getElement("o1")
	g = getElement("galeria")
	var h1 = getElement("h1")
	var z1 = getElement("z1")
	var r1 = getElement("r1")
	r1.style.display ="block"
	r1.style.width = picture_width +"px"
	r1.style.height = picture_height + "px"
	r1_h = picture_height
	r1_w = picture_width
	
	z1.style.display = "block"
	
	var z1_h = getHeight("z1")
	 
	
	o1.style.width = picture_width + "px";
	h1.style.width =picture_width + "px";
	
	h1.innerHTML = g.innerHTML;
	h1_h = getHeight("h1")
 
	o1.style.height = r1_h +  z1_h +  h1_h +"px" ;
	o1.style.left =  ( getWindowSize()[0] - r1_w ) / 2 + "px";
	o1.style.top =  ( getWindowSize()[1] - r1_h - z1_h - h1_h ) / 2 +"px";
	r1.style.backgroundImage = "url('"+this.src+"')";
	//o1.style.padding ="10px"
	o1.style.border = "10px solid white";
	
}
 
function open_picture(path){

	fs = getElement("full-screen")
	var o1 = getElement("o1")

	fs.style.width = getWindowSize()[0] + "px";
	fs.style.height =getWindowSize()[1] + "px";
	fs.style.display = "block"
	o1.style.display = "block"
	picture.src = path;
	
}
function close_picture(name){
	fs = getElement("full-screen")
	var o1 = getElement(name)
	fs.style.display = "none"
	o1.style.display = "none"

}

function open_location( url ){
	var xmlHttp = null
	_width = 250;
	_height = 400;
	edt = getElement("edtSearch")
 
	
	xmlHttp = createAjax();
	
	
	/*var fs = getElement("full-screen")
	fs.style.width = getWindowSize()[0] + "px";
	fs.style.height =getWindowSize()[1] + "px";
	fs.style.display = "block"*/

	var o2 = getElement("o2")
	
	o2.style.display = "block"
	
	var z2 = getElement("z2")

	z2.style.display = "block"
	var z2_h = getHeight("z2")
	
	var r2 = getElement("r2")
	r2.style.height = _height + "px"
	r2.style.width = _width + "px"
	r2.style.display ="block"
	r2.style.overflow ="auto"
	o2.style.height = _height + z2_h + "px";
	o2.style.width = _width + "px"
	o2.style.left =  getLeft("edtSearch") + getWidth("edtSearch") - _width  - 20 + "px";
	o2.style.top =   getTop("edtSearch") + getHeight("edtSearch")  +"px";
	o2.style.borderWidth = "1px 1px 2px 1px";
	o2.style.borderStyle = "solid";
	o2.style.borderColor = "#eee #eee #aaa #eee";
	o2.style.padding ="10px"
	ajax_location(xmlHttp, url ,edt.value, r2 )
	

	
}
