/* 
 * [a] Dries Van haver
 * [c] Oskar D
 * [w] www.oskard.be
 * 
*/

// trigger verbouwingen
function openBox(page){
	//alert(page);
	myLightWindow.activateWindow({href: page, type: 'external', title: 'De Bie verbouwt'});
}

// mine.loadContent('default.php?page=multipress');

  function playmovie(url, cptn, ttl, clss, prms){	
 	 if (url !=undefined && url!=null ){
		if(ttl!=undefined && ttl!=null){
			ttl = ttl;
		}else{
			ttl = '';	
		}	
		if(prms!=undefined && prms!=null){
			prms = prms;
		}else{
			prms = '';	
		}	
		if (cptn!=undefined && cptn!=null){
			cptn = cptn;
			if(cptn=='softproof'){
				cptn = '<img src="img/icn_pdf.jpg" alt="" /> <a href="files/pdf/softproof.pdf" target="_blank">download</a> (1,7 mb)'
			}else if(cptn=='staccato'){
				cptn = '<img src="img/icn_pdf.jpg" alt="" /> <a href="files/pdf/staccato.pdf" target="_blank">download</a> (800 kb)';
			}else if(cptn=='agfa'){
				cptn='<img src="img/icn_pdf.jpg" alt="" /> <a href="files/pdf/ct_debie_2003-09-18_en.pdf" target="_blank">download</a> (230 kb)';	
			}
		}else{
			cptn = '';
		}
		myLightWindow.activateWindow({href: url, title: ttl,author: '',caption: cptn, params: prms});
	}
}

    //googleMaps function

    function load() {
    if (GBrowserIsCompatible()) {
       	var map = new GMap2(document.getElementById("map"));
		var center = new GLatLng(51.108878, 4.547252);
		map.setCenter(center, 10);
		map.addControl(new GLargeMapControl());
		map.setMapType(G_NORMAL_MAP);
		var marker = new GMarker(center);
		map.addOverlay(marker);
     }
    }
    
    function od_makeEditable(txt, defaultVal) {
    	if (txt.value == defaultVal) { txt.value = ''; txt.style.color = '#000'; txt.focus(); }	
    }
    
    function od_showRoute(defaultVal) {
    	if(document.getElementById('routeAddress').value != defaultVal && document.getElementById('routeAddress').value != ''){
    		myLightWindow.activateWindow({href: 'http://maps.google.be/maps?f=d&hl=nl&geocode=&saddr='+escape(document.getElementById('routeAddress').value)+'&daddr=Nijverheidsstraat+6+2570+Duffel',title: 'Routebeschrijving'});    
    	}else{
    	alert('Geef een adres in aub');
    	document.getElementById('routeAddress').value = ''; document.getElementById('routeAddress').style.color = '#000'; document.getElementById('routeAddress').focus();
		return false;
    	}
    }    
    // geschiedenis / wie is wie detail
    function writeDetail(year, img, txt){
		var image='<img alt="" src="http://www.debie.net/img/'+img+'" />';
		document.getElementById('historyDetail').innerHTML='<table bgcolor="#E8EDF1" style="border:1px solid #CCCCCC; font-size:10px; margin-bottom:10px;" width="440px"><tr><td>'+image+'</td><td valign="top"><h1>'+year+'</h1>'+txt+'</td></tr></table>';
	}

	// newspicture
	function od_writepic(div, content){
		document.getElementById(div).innerHTML='<img src='+content+' alt=""/>';
	}
	// newsnavchange
	function changenav(url){
 		document.getElementById("flashnav").GotoFrame(2);//("urlVar",url);
	}
