var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}



var base64s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

function decode(encStr) {
	var bits;
	var decOut = '';
	var i = 0;
	for(; i<encStr.length; i += 4) {
		bits = (base64s.indexOf(encStr.charAt(i))    & 0xff) <<18 |
			 (base64s.indexOf(encStr.charAt(i +1)) & 0xff) <<12 |
			 (base64s.indexOf(encStr.charAt(i +2)) & 0xff) << 6 |
			  base64s.indexOf(encStr.charAt(i +3)) & 0xff;
		decOut += String.fromCharCode((bits & 0xff0000) >>16, 
		(bits & 0xff00) >>8, bits & 0xff);
		}
	if(encStr.charCodeAt(i -2) == 61) { return(decOut.substring(0, decOut.length -2)); }
	else if(encStr.charCodeAt(i -1) == 61) { return(decOut.substring(0, decOut.length -1));	}
	else {return(decOut)};
	}


function tiodtsuj(a) { var x=decode(a);temp=x.split('###');document.write('<a href="mai');document.write('lto:'+temp[1]);document.write('@');document.write(temp[0]+'">');document.write(temp[1]);document.write('@');document.write(temp[0]);document.write('</a>');} 	



function goto(mylink) {
	document.location.href='http://www.bio-oil.biz/'+mylink+'/';
	}
	
	
	
	
	
	
	
	
    function load() {
      if (GBrowserIsCompatible()) {
		  
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
var map2 = new GMap2(document.getElementById("map2"));
map2.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map2.addControl(new GMapTypeControl());


// map.addControl(new GOverviewMapControl());
//map.addControl(new GScaleControl());


// map.addOverlay(new GMarker(map, icon));

var geocoder = new GClientGeocoder();
var newcoords="";
function showAddress(address) {
  geocoder.getLatLng(
    address,
    function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.setCenter(point, 10);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        // marker.openInfoWindowHtml(address);
      }
    }
  );
}
// http://maps.google.at/maps?f=q&source=s_q&hl=de&geocode=&q=Gut+Zuckermantelhof&sll=48.364189,16.681647&sspn=0.084283,0.154495&g=2241+Sch%C3%B6nkirchen&ie=UTF8&z=13&iwloc=A
function showAddress2(address) {
  // map2.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);

	var point=new google.maps.LatLng(48.340248,16.665316)
	map2.setCenter(point, 10);
	var marker1 = new GMarker(point);
	map2.addOverlay(marker1);
        // marker.openInfoWindowHtml(address);
}

// showAddress("Hospodarska 448, 91951 Spacince, Slovakia");
showAddress("Spacince, Slovakia");
showAddress2();
   }
    }	
	
	
function checkform() {
	if (document.kontaktform.name.value.length==0) { alert("Bitte geben Sie Ihren Namen an"); document.kontaktform.name.focus(); return false; }
	if (document.kontaktform.email.value.length==0) { alert("Bitte geben Sie Ihre E-mail-Adresse an"); document.kontaktform.email.focus(); return false; }
	if (document.kontaktform.text.value.length<10) { alert("Bitte geben Sie eine Nachricht ein"); document.kontaktform.text.focus(); return false; }
	}
	
function checkform2() {
	if (document.kontaktform.name.value.length==0) { alert("Please provide your name"); document.kontaktform.name.focus(); return false; }
	if (document.kontaktform.email.value.length==0) { alert("Please provide your email-address"); document.kontaktform.email.focus(); return false; }
	if (document.kontaktform.text.value.length<10) { alert("Please enter a message"); document.kontaktform.text.focus(); return false; }
	}
	
