\n');
}
function doSwf(divDest,flashName,flashFile,w,h,isTrans,talkTo,callFunction,parseString){
flashsrc = "";
flashsrc += "";
document.getElementById(divDest).innerHTML = flashsrc;
}
function flashLoaded(whatFlash) { flashCount++; if(flashCount>=2) hideLayer("initial_load"); }
function jsPopup(whatUrl){ window.open(whatUrl, ''); }
function hideLayer(layerid){ document.getElementById(layerid).style.visibility = "hidden"; }
function showLayer(layerid){ document.getElementById(layerid).style.visibility = "visible"; }
function gLoad() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.setCenter(new GLatLng(Number(33.72434),Number(157.867202)),Number(1));
map.addMapType(G_PHYSICAL_MAP);
G_NORMAL_MAP.getMinimumResolution = G_SATELLITE_MAP.getMinimumResolution = G_HYBRID_MAP.getMinimumResolution = function () { return 1 };
G_NORMAL_MAP.getMaximumResolution = G_SATELLITE_MAP.getMaximumResolution = G_HYBRID_MAP.getMaximumResolution = function () { return 18 };
var hierarchy = new GHierarchicalMapTypeControl();
hierarchy.addRelationship(G_SATELLITE_MAP,G_HYBRID_MAP,"Show labels",true);
map.addControl(hierarchy);
map.setMapType(G_SATELLITE_MAP);
map.enableScrollWheelZoom();
}
}
function setLocation(args) {
var geoArray = args.split("||");
var geoLoc = new GLatLng(parseFloat(geoArray[0]), parseFloat(geoArray[1]));
map.setCenter(geoLoc, Number(geoArray[2]));
}
function clearMapMarkers(){ map.clearOverlays(); }
function markerFromFlash(args){
var mArray=args.split(/,/);
var thepoint = new GLatLng(parseFloat( mArray[1] ),parseFloat( mArray[2] ));
var themarker = createMarker(mArray[0], thepoint, mArray[3]);
map.addOverlay(themarker);
clearTimeout(loadInterval);
loadInterval = setTimeout("hideLayer('loading_widget')",100);
}
function createMarker(myId,point,iconImg) {
var icon = new GIcon();
icon.image = "./bg/"+iconImg+"_2.png";
icon.iconSize = new GSize(20, 20);
icon.iconAnchor = new GPoint(10,10);
var marker = new GMarker(point,icon);
GEvent.addListener(marker, "click", function() {
map.panTo(point);
if(iconImg=="HOLIDAY"){ sendDataToFlash("coverflow","showHoliday", myId);
} else if(iconImg=="HOTEL"){ showLayer('hotel_panel'); setTimeout("openHotel('"+myId+"')",1000); } });
if(iconImg=="HOLIDAY"){
GEvent.addListener(marker, "mouseover", function() { clearTimeout(mTime); mTime = setTimeout("moveCoverflow('"+myId+"')",500); });
GEvent.addListener(marker, "mouseout", function() { clearTimeout(mTime); }); }
return marker;
}
function moveCoverflow(theId){ sendDataToFlash("coverflow","repositionCoverflow", theId); }
function openHotel(theId){ sendDataToFlash("hotel_panel","openPanel", theId); }
function sendDataToFlash(talkTo,callFunction,parseString){ doSwf('comdiv','comflash','js_parser.swf',1,1,true,talkTo,callFunction,parseString); }
function putCoverflowTop(){ document.getElementById('coverflow').style.zIndex = 6; document.getElementById('map').style.zIndex = 4;}
function putMapTop(){ document.getElementById('coverflow').style.zIndex = 4; document.getElementById('map').style.zIndex = 6;}
function popWindow(theURL,winName,features) {
var newWin
newWin = window.open(theURL,winName,features);
newWin.focus();
}

