var xenones=0; var mnhmeia=0; var fush=0; var anthropos=0; var selectableTextPanel; //////////////////////////////////////////////////////////////// function addHTMLControl() { addMagnifyControl(); // addXenonesControl(); // addMnhmeiaControl(); // addNeroControl(); // addFushControl(); // addAnthroposControl(); try{ // addFAQControl(); // addWeatherControl(); }catch(err){alert(err);} } function addMagnifyControl() { html='

'+ '
'+ 'Μεγάλος
Χάρτης
'; var magnify=new HtmlControl(html, { visible:true, printable:false }); map.addControl(magnify, new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(15, 35))); GEvent.addDomListener(document.getElementById('smalllargemap'), 'click', function() { resizeMap(); var button=document.getElementById('biglargetxt'); var html=(mapshort==0? 'Μικρός
Χάρτης':'Μεγάλος
Χάρτης'); html=''+html+''; button.innerHTML=html; }); } function addXenonesControl() { var html = '
'+ ''+ 'Οι Ξενώνες
'; var cat15=new HtmlControl(html, { visible:true, printable:false }); map.addControl(cat15, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(4, 3))); GEvent.addDomListener(document.getElementById('cat15'), 'click', function() { // alert('15'); if (xenones==1) xenones=0; else xenones=1; if (xenones==1) { show(15); document.getElementById('cat15').style.background="#EADFC9"; } else { hide(15); document.getElementById('cat15').style.background="white"; } } ); } function showXenones() { // alert('15'); if (xenones==1) xenones=0; else xenones=1; if (xenones==1) { show(15); } else { hide(15); } } function addMnhmeiaControl() { var html = '
'+ ''+ ''+ 'Τα Μνημεία
'; var cat15=new HtmlControl(html, { visible:true, printable:false }); map.addControl(cat15, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(93, 3))); GEvent.addDomListener(document.getElementById('cat6'), 'click', function() { // alert('15'); if (mnhmeia==1) mnhmeia=0; else mnhmeia=1; if (mnhmeia==1) { show(4); show(6); document.getElementById('cat6').style.background="#FADEB1"; } else { hide(4); hide(6); document.getElementById('cat6').style.background="white"; } } ); } function showMnhmeia() { switchToMap(); if (mnhmeia==1) mnhmeia=0; else mnhmeia=1; if (mnhmeia==1) { show(4); // document.getElementById('cat6').style.background="#FADEB1"; } else { hide(4); // document.getElementById('cat6').style.background="white"; } removeClusterMarker(); } function addNeroControl() { } function addFushControl() { var html = '
'+ ''+ 'Η Φύση
'; var cat15=new HtmlControl(html, { visible:true, printable:false }); map.addControl(cat15, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(198, 3))); GEvent.addDomListener(document.getElementById('cat5'), 'click', function() { // alert('5'); if (fush==1) fush=0; else fush=1; if (fush==1) { show(9); document.getElementById('cat5').style.background="#00ff7f"; } else { hide(9); document.getElementById('cat5').style.background="white"; } } ); } function showFush() { if (fush==1) fush=0; else fush=1; if (fush==1) { show(9); show(11); } else { hide(9); hide(11); // document.getElementById('cat5').style.background="white"; } removeClusterMarker(); } function addAnthroposControl() { var html = '
'+ ''+ 'Ο άνθρωπος
'; var cat15=new HtmlControl(html, { visible:true, printable:false }); map.addControl(cat15, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(262, 3))); GEvent.addDomListener(document.getElementById('cat9'), 'click', function() { // alert('15'); if (anthropos==1) anthropos=0; else anthropos=1; if (anthropos==1) { show(10); document.getElementById('cat9').style.background="#FFD380"; } else { hide(10); document.getElementById('cat9').style.background="white"; } } ); } function showAnthropos() { //switchToMap(); if (anthropos==1) anthropos=0; else anthropos=1; if (anthropos==1) { show(10); showPolylines(); } else { hide(10); hidePolylines(); } removeClusterMarker(); } function switchToMap() { //alert(parent.document.getElementById('mapdiv')); if (parent.document.getElementById('mapdiv')==null) { location.href='index2.php'; return false; } if (parent.document.getElementById('mapdiv').style.display=='none') { parent.document.getElementById('mapdiv').style.display='block'; $('maindiv').style.display='none'; } } function odhgies() { selectableTextPanel.setVisible(!selectableTextPanel.isVisible); // var button=document.getElementById('faqtxt'); // var html=(selectableTextPanel.isVisible)?'Απόκρυψη
Οδηγιών':'Οδηγίες χρήσης διαδραστικού χάρτη'; // html=''+html+' '; // button.innerHTML=html; } function addWeatherControl() { // another HtmlControl, this time the text it contans is not selectable or printable and we want it to be hidden when first created html='

Ο Καιρός στην Ελλάδα

Συνθήκες Mostly Cloudy
Θερμοκρασία 7C

'; // pass the html, override default visible setting and accept defaults settings for selectable(false) and printable(false) var nonSelectableTextPanel=new HtmlControl(html, { visible:false }); map.addControl(nonSelectableTextPanel, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(7, 158))); // another click event listener - we want to show/hide nonSelectableTextPanel when nonSelectableButton is clicked GEvent.addDomListener(document.getElementById('nonSelectableButton'), 'click', function() { nonSelectableTextPanel.setVisible(!nonSelectableTextPanel.isVisible); var button=document.getElementById('nonSelectableButton'); var html=(nonSelectableTextPanel.isVisible)?'Απόκρυψη Καιρού':'Ο Καιρός στην Ελλάδα'; html=''+html+''; button.innerHTML=html; }); } /////////////////////////////////////////////////////////////////////// function showPolylines() { for (var i=0; i