var current_url = self.location.toString().substring( 0, self.location.toString().lastIndexOf( "/" ) );

document.write( '<script src="' + current_url + '/js/prototype.js" type="text/javascript"></script>' );
document.write( '<script src="' + current_url + '/js/sifr.js" type="text/javascript"></script>' );
document.write( '<script src="' + current_url + '/js/sifr-addons.js" type="text/javascript"></script>' );
document.write( '<script src="' + current_url + '/js/enquiry_form.js" type="text/javascript"></script>' );

/*
	sIFR.replaceElement( named( { 
		sSelector: "body h1", 
		sFlashSrc:"vandenkeere.swf", 
		sColor:"#000000", 
		sLinkColor:"#000000", 
		sBgColor:"#FFFFFF", 
		sHoverColor:"#CCCCCC", 
		nPaddingTop:20, 
		nPaddingBottom:20, 
		sFlashVars:"textalign=center&offsetTop=6" 
	}));
*/

window.onload = function()
{
	sIFR.replaceElement( named( { 
			sSelector: "h2#page_title", 
			sFlashSrc: "helenbg.swf", 
			sColor: "#000000",
			sWmode: "transparent"
		} ) );

	sIFR.replaceElement( named( { 
			sSelector: "#links_right h3", 
			sFlashSrc: "helenbg.swf", 
			sColor: "#044284",
			sWmode: "transparent",
			nPaddingBottom: 10
		} ) );
		
		if ( $('sf_print') )
		{
			$$('#sf_print a').each( function(el){
				if ( el.className == 'print' )
				{
					el.onclick = function(){window.focus();window.print();};
				}
				else if ( el.className == 'sf' )
				{
					el.onclick = function(){popUp_news('stf2.php');};
				}
			});
		}
};

function showPetrolStation( flashVars )
{
	var paramFlashVars = '';
	var paramArray = [];
	
	for ( obj in flashVars )
	{
		paramArray.push( obj + '=' + flashVars[obj] );
	}
	
	paramFlashVars = paramArray.join('&');
	var html = '<object class="fl" type="application/x-shockwave-flash" data="images/petrolstation.swf" width="225" height="578"> \
				<param name="quality" value="high" /> \
				<param name="FlashVars" value="'+paramFlashVars+'" /> \
        <param name="movie" value="images/petrolstation.swf" /> \
    </object>';
	document.write( html );
}


function showFlash( url, w, h )
{
	var html = '<object type="application/x-shockwave-flash" data="'+url+'" width="'+w+'" height="'+h+'"> \
				<param name="quality" value="high" /> \
        <param name="movie" value="'+url+'" /> \
    </object>';
	document.write( html );
}

var popUpUploadedThumb;
function showUploadedThumb( val, w, h )
{
	if ( popUpUploadedThumb ) popUpUploadedThumb.close();
	popUpUploadedThumb = window.open( uploaded_images_path + val, 'uploadThumb', "width=" + w + ",height=" + h + ",scrollbar=no,status=no,location=no" );
	popUpUploadedThumb.focus();
}

/**/

function popUp_news(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=400,left = 440,top = 312');");
}
