function checknumber(field) {
	if (document.getElementById(field).value<1 || document.getElementById(field).value>10) {
		alert('Please enter a valid number beetween 1 and 10!');
		return false;
	}
	return true;
}
function ieupdate() {
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++) {
	    objects[i].outerHTML = objects[i].outerHTML;
	}
}


function load() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		
		map.setCenter(new GLatLng(47.510012,19.080162), 12);
	}
}

function hmapload(coordx,coordy,zoom) {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		
		map.setCenter(new GLatLng(coordx,coordy), zoom);
		
		var point = new GLatLng(coordx,coordy);
	    map.addOverlay(new GMarker(point));
									
	}
}


function init() {
	ieupdate();
}

var xmenuon=0;
function menuon(obj) {
	var str = obj.src;
	if (str.indexOf("off\.")>=0) {
		obj.src = str.replace(/off\./,"on.");
		xmenuon = 1;
	}
}
function menuoff(obj) {
	var str = obj.src;
	if (xmenuon>0 && str.indexOf("on\.")>=0) {
		obj.src = str.replace(/on\./,"off.");
		xmenuon = 0;
	}
}

function imgwindow(url,width,height) {
	width+=20;
	height+=20;
	var w = window.open(url,'image','width='+width+',height='+height);
}


function showimage(url,width,height) {
	var w = window.open('','image','width='+width+',height='+height);
	w.document.write('<html><head><title>Photo</title></head><body style="padding: 0px; margin: 0px;"><a href="#" onclick="window.close();"><img src="'+url+'" border="0" /></a></body></html>');
}
