﻿var map = null;
    var geocoder = null;

    function initialize() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(47.519983057945794, 19.040679931640625), 13);
        geocoder = new GClientGeocoder();
		map.setUIToDefault();
      }
    }
	
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert("Sajnáljuk, de a(z) " + address + " nem található!");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
	
		
		
		function belep(){
			if (document.auth.userwithoutdomain.value.indexOf('@') == -1) {
				document.auth.user.value = document.auth.userwithoutdomain.value + '@freemail.hu';
			}
			else {
				document.auth.user.value = document.auth.userwithoutdomain.value;
			}
		}
		
		function chmail(mailico){
			document.getElementById('mailicon').src='kepek/' + mailico + '.gif';
			switch(mailico){
				
				case 'freemail':
					document.getElementById('mailforms').innerHTML="<form name='auth' action='https://belepes.t-online.hu:443/auth.html' method='post' target='_blank'><div class='inputtextname'>Felhasználónév</div><div><input type='text' name='userwithoutdomain' /></div><div class='inputtextname'>Jelszó</div><div><input type='password' name='pass' /></div><div class='paddingtopbottom'><input onclick='javascript:belep();' type='submit' value='Bejelentkezés' name='submit' /></div><input type='hidden' value='plusauth' name='cmd' /><input type='hidden' name='user' /><input type='hidden' value='commands.PlusAuth' name='.formId' /><input type='hidden' value='http://freemail.hu/' name='backurl' /></form>";
					break;
				
				case 'gmail':
					document.getElementById('mailforms').innerHTML="<form id='gaia_loginform' action='https://www.google.com/accounts/ServiceLoginAuth?service=mail' method='post' target='_blank'><div class='inputtextname'>Felhasználónév</div><div><input type='text' name='Email'  id='Email' value='' /></div><div class='inputtextname'>Jelszó</div><div><input  type='password' name='Passwd' id='Passwd' /></div><div class='paddingtopbottom'><input type='submit' value='Bejelentkezés'  name='signIn' /></div><input type='hidden' name='continue' id='continue' value='http://mail.google.com/mail/' /><input type='hidden' name='service' id='service' value='mail' /><input type='hidden' name='rm' id='rm' value='false' /><input type='hidden' name='ltmpl' id='ltmpl' value='default' /><input type='hidden' name='hl' id='hl' value='hu' /><input type='hidden' name='ltmpl' id='ltmpl' value='default' /><input type='hidden' name='scc' id='scc' value='1' /></form>";
					break;
				
				case 'citromail':
					document.getElementById('mailforms').innerHTML="<form action='http://citromail.hu/index.vip' method='post' name='login' target='_blank'><div class='inputtextname'>Felhasználónév</div><div><input name='user' type='text' id='user' value='' /></div><div class='inputtextname'>Jelszó</div><div><input name='passwd' type='password' id='passwd' /></div><div class='paddingtopbottom'><input type='submit' value='Bejelentkezés' id='submit_form' /></div></form>";
					break;
					
				case 'indamail':
					document.getElementById('mailforms').innerHTML="<form action='http://daemon.indapass.hu/http/login' method='post' target='_blank'><div class='inputtextname'>E-mail cím</div><div><input type='text' id='email' name='username' maxlength='100' value=''/></div><div class='inputtextname'>Jelszó</div><div><input type='password' id='pwd' name='password' maxlength='100'/></div><div class='paddingtopbottom'><input type='submit' value='Bejelentkezés' /><input type='hidden' name='partner_id' value='vipmail' /><input type='hidden' name='redirect_to' value='http://indamail.hu/' /><input type='hidden' value='login' name='op'/></div></form>";
					break;
			}		
		}
		