/*
FRONT OFFICE SCRIPTS PAGE
*/

// COMMON METHODS

// On load event
Event.observe(window, 'load', OnPageLoad);

// Preload process status
function OnPageLoad() {
	// None
}

// Resize content block
function contBlockHeight(_minHeight) {
	// Get layer
	var _cont = $("pgContent");
	if (_cont != null) {
		var _height = parseInt(_cont.offsetHeight);
		// Resize layer
		if (_height < _minHeight) { _cont.style.height = _minHeight + 'px'; }
	}
}

// Load top flash file
function loadFlash(_flash) {
	// Get flash place layer
	var _layer = $('flashLoad');
	// Check if layer exist
	if (_layer != null) {
		// Plug-in update
		_layer.innerHTML = 'To view this content you must have the lastest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&amp;promoid=BIOW" target="_blank">FLASH PLUGIN</a> installed.';
		// Create flash object
		var _swf = new SWFObject('/Design/Flash/flSlider.swf', 'flashLoad', '588', '231', '8', '#ffffff');
		// Add variable
		_swf.addVariable('xmlScript', '/Design/Flash/scr' + _flash + '_' + _layer.lang + '.xml');
		// Set transparent mode
		// _swf.addParam("wmode", "transparent");
		// Load flash
		_swf.write(_layer.id);
	} 
}

