// JavaScript Document
function launch( model ) {
	var url = 'intro.html';

	if ( model == 1 ) {
		var width 	= screen.availWidth;
		var height 	= screen.availHeight;

		result = window.open( url, 'portifolio', 'width='+(width-8)+',height='+(height-58)+',left=0,top=0,directories=0,status=1,resizable=1,scrollbars=' + ( width < 1280 ? '1': '0' ) );

		setTimeout( "testPopup()", 700 );
	} else {
		document.location.href = url;
	}
}

function testPopup() {
	if ( (result == null) || (typeof(result) == "undefined") || (typeof(result.location.hash) != "string") ) {
		window.alert( "Pop-up is blocked. Please, enable it for access fullscreen." );
	}
}

function writeFlash( targetFlash, widthFlash, heightFlash, backFlash  ) {
	document.write( '<object align="absmiddle" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + widthFlash + '" height="' + heightFlash + '">');
	document.write( '<param name="allowScriptAccess" value="sameDomain" />' );
	document.write( '<param name="movie" value="' + targetFlash + '">' );
	document.write( '<param name="quality" value="high">' );
	document.write( '<param name="menu" value="false">' );
	
	if ( backFlash ) {
		document.write( '<param name="bgcolor" value="' + backFlash + '">' );
		document.write( '<embed src="' + targetFlash + '" quality="high" bgcolor="' + backFlash + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + widthFlash + '" height="' + heightFlash + '"></embed>' );
	} else {
		document.write( '<param name="wmode" value="transparent">' );
		document.write( '<embed align="absmiddle" src="' + targetFlash + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + widthFlash + '" height="' + heightFlash + '"></embed>' );
	}
		
	document.write( '</object>' );
}

