function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}

function load() {
  if (GBrowserIsCompatible()) {
	
		var map = new GMap2(document.getElementById("map"));
		var center = new GLatLng(53.575931, -1.78533);
		map.setCenter(center, 11);
		//map.addControl(new GLargeMapControl());
		//map.addControl(new GSmallMapControl());
		//map.addControl(new GMapTypeControl());
		map.addControl(new GSmallZoomControl());
		var marker = new GMarker(center);
		
		GEvent.addListener(marker, "click", function() {
		  //marker.openInfoWindowHtml("<div style='width:200px;font-size:10px;'>address??</div>");
		});

		

		map.addOverlay(marker);
		
		//marker.openInfoWindowHtml("<div style='width:200px;font-size:10px;'>address??</div>");
	
	}
}
    


function checkform(x){
	
	var fn=document.getElementById('name');
	var ft=document.getElementById('tel');
	
	if(fn.value=='' || ft.value==''){ 
		showcontacterror();
	}else{
		document.callback.submit();
	}

}

ceh=0;
function showcontacterror(){
	
	if(ceh<30){
		
		ceh=ceh+3;
		var ce=document.getElementById('contacterror');
		ce.style.height=ceh+"px";
		
		cetmr=setTimeout(showcontacterror,20);
		
	}
	
}


conttop=-542;
sitetop=0;

drop=Array(10,20,25,30,40,50,55,55,60,60,60,70,-20,-10,20,10,-10,-5,5,0,0,0,0,0,0,0);
hide=Array(10,20,30,40,45,50,60,65,65,70,70,0,0,0,0,0,0,0,0,0,0,0);
cnt=0;
blockdrop=0;

function ini_contact(){
	
	if(cnt<20 && blockdrop==0){
	
		var cont=document.getElementById('contact');
		var site=document.getElementById('site');
		
		sitetop=sitetop+drop[cnt];
		conttop=conttop+drop[cnt];
		cnt++;
		//siteheight=siteheight-5;
		
		site.style.top=sitetop+"px";
		cont.style.top=conttop+"px";
			
		ctmr=setTimeout(ini_contact,20);
	
	}else{
		cnt=0;
		blockdrop=1;
	}
}

function hide_contact(){
	
	var cont=document.getElementById('contact');
	var site=document.getElementById('site');

	if(cnt<20){
	
		sitetop=sitetop-hide[cnt];
		conttop=conttop-hide[cnt];
		cnt++;
		//siteheight=siteheight-5;
		
		site.style.top=sitetop+"px";
		cont.style.top=conttop+"px";
			
		ctmr=setTimeout(hide_contact,20);
	
	}else{
		cnt=0;
		site.style.top="0px";
		cont.style.top="-542px";
		conttop=-542;
		sitetop=0;
		blockdrop=0;
	}
}


function get_url(x){
	window.location.href=x;
}

function printflash(swf,w,h,div){
		var so = new SWFObject(swf, "flash-animations", w, h, "8", "#ffffff");
		so.addParam("wmode", "transparent");
		so.write(div);	
}

function mouseover(x,value){
	
	x.style.opacity = value/10;
	x.style.filter = 'alpha(opacity=' + value*10 + ')';
	
	if(value==9) x.style.borderColor="#EEEEEE";
	else x.style.borderColor="#CCCCCC";
}


function loadflashgallery(r,gid,iid,type){
	
	var m=document.getElementById('mask');
	var c=document.getElementById('holder');
	var s=document.getElementById('gallery');

	c.style.height="100%";
	c.style.overflow="hidden";
	m.style.display="block";
	s.style.display="block";
	
	var so = new SWFObject("/media/gallery.swf?r="+r+"&www=/&gallid="+gid+"&iid="+iid+"&type="+type, "swfdisplay", 900, 600, "8", "#000000");
	so.write("gallery");	
	
	
}

function closeflashgallery(){
	
	var m=document.getElementById('mask');
	var c=document.getElementById('holder');
	var s=document.getElementById('gallery');

	c.style.height="auto";
	c.style.overflow="visible";
	m.style.display="none";
	s.style.display="none";
	
	
}
