function load() {
  if (GBrowserIsCompatible()) {
	
			var map = new GMap2(document.getElementById("map"));
			var center = new GLatLng(53.6781796487114, -1.5802717208862304);
			map.setCenter(center, 15);
			map.addControl(new GLargeMapControl());
			//map.addControl(new GMapTypeControl());
	
			var marker = new GMarker(center);
			
			GEvent.addListener(marker, "click", function() {
			  marker.openInfoWindowHtml("<div style='width:300px;font-size:10px;'><b>Lithium Studio</b><br/>Saga House<br/>Illingworth Street<br/>Ossett<br/>West Yorkshire. WF5 8AL<br/><br/><a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=WF5+8AL&sll=37.0625,-95.677068&sspn=55.849851,113.90625&ie=UTF8&ll=53.677862,-1.579049&spn=0.010333,0.027809&z=16' target='_blank'>Launch Full Google Map</a></div>");
			});
	
			
	
			map.addOverlay(marker);
			
			marker.openInfoWindowHtml("<div style='width:300px;font-size:10px;'><b>Lithium Studio</b><br/>Saga House<br/>Illingworth Street<br/>Ossett<br/>West Yorkshire. WF5 8AL<br/><br/><a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=WF5+8AL&sll=37.0625,-95.677068&sspn=55.849851,113.90625&ie=UTF8&ll=53.677862,-1.579049&spn=0.010333,0.027809&z=16' target='_blank'>Launch Full Google Map</a></div>");
	}
}

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
         }
      }
   }    
}

naction=Array('','','','','','');
npos=Array(-30,-30,-30,-30,-30,-30);

function navover(x){
	naction[x]='over';
}

function navout(x){
	naction[x]='off';
}

function tout(){
	
	for(x=0;x<=5;x++){
	
		if(naction[x]=='over'){
			
			if(npos[x]!=0){
			
				npos[x]=npos[x]+5;
				n=document.getElementById('nc'+x);
				n.style.backgroundPosition = '0px '+npos[x]+'px';
			
			}else{
				
				naction[x]='';	
			
			}
		}
		
		if(naction[x]=='off'){
			
			if(npos[x]!=-30){
			
				npos[x]=npos[x]-5;
				n=document.getElementById('nc'+x);
				n.style.backgroundPosition = '0px '+npos[x]+'px';
			
			}else{
				
				naction[x]='';	
			
			}
		}
	
	}
	
	t=setTimeout(tout,5);
}

t=setTimeout(tout,5);


function loadflash(){
		
		var so = new SWFObject("media/lithium.swf?r=15", "flash-animations", '617', '340', "6", "#ffffff");
		so.addParam("wmode", "transparent");
		so.write("flash");

}


function clearplaying(){
		
		document.getElementById('flash').innerHTML="";
		printflash("media/studio.swf?r=999","100%","100%","bgr");
		
}

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 showmap(){
	
	m=document.getElementById('mapholder');
	m.style.zIndex=100;
	
}

function loadgallery(url,ti){
			
			document.getElementById('mask').style.display="block";
			document.getElementById('gallery').style.display="block";
			var so = new SWFObject("media/gallery.swf?r=1111&ti="+ti+"&gall=http://www.lithiumstudios.co.uk/images/gallery/"+url+"/", "flashgal", "100%" ,"100%", "8", "#333333");
			so.write("swf");

}

function closegallery(){
		document.getElementById('mask').style.display="none";
		document.getElementById('gallery').style.display="none";
}