window.onload = function() {
if(document.getElementById("map")){
    if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.929672, 23.755958), 15);
        // Our info window content
        var infoTabs = [new GInfoWindowTab("Tab #1", "<b><u>Κεντρο Ηλιακης Προστασιας</u></b>")];

        // Place a marker in the center of the map and open the info window
        // automatically
        var marker = new GMarker(map.getCenter());
        GEvent.addListener(marker, "click", function() {marker.openInfoWindowTabsHtml(infoTabs);});
        map.addOverlay(marker);
        marker.openInfoWindowTabsHtml(infoTabs);
        map.addControl(new GLargeMapControl ( ));
        map.addControl(new GMapTypeControl ( ));
        map.addControl(new GScaleControl ( ));
    }
}
};
window.unload = function() { 
	if(document.getElementById("map")){ GUnload();}
}



function SendForm () {
	i=0;
	send=true;
	while(document.getElementById('must'+i)) {
 		if (document.getElementById('must'+i).value == "" || document.getElementById('must'+i).value == 0 ) {
			document.getElementById('must'+i).style.border="double 2px #CC0000";
			send=false;
		}
		else document.getElementById('must'+i).style.border="dotted 1px #CC0000";
		i++;
	}
	if(document.getElementById('must2')){
		if(document.getElementById('must2').value.search("@") == -1){
			document.getElementById('must2').style.border="double 2px #CC0000";
			send=false;
		}
	}
    if(!send) document.getElementById("error").style.display="block";
	return send;
}

function ResetForm (){
	i=0;
	while(document.getElementById('must'+i)) {
		document.getElementById('must'+i).style.border="dotted 1px #CC0000";
		document.getElementById("error").style.display="none";
		i++;
	}	
}
