function writeMovieObject(name) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="movieplayer" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="_EXT/movieplayer.swf?movie=' + name + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#7c7c7c" />');
	document.write('<embed src="_EXT/movieplayer.swf?movie=' + name + '" quality="high" bgcolor="#7c7c7c" width="100%" height="100%" name="movieplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}
function writeFlashObjectCard() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="500" id="splash_card" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="_EXT/splash_card.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="_EXT/splash_card.swf" quality="high" bgcolor="#ffffff" width="400" height="500" name="splash_card" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function writeFlashObject() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="448" height="460" id="splash" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="_EXT/splash.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="_EXT/splash.swf" quality="high" bgcolor="#ffffff" width="448" height="460" name="splash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function writeGameObject() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="600" height="350" id="tattoogame" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="_EXT/tattoo_game.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#000000" />');
	document.write('<embed src="_EXT/tattoo_game.swf" quality="high" bgcolor="#ffffff" width="600" height="350" name="splash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function writeMPObject(name) {
document.write('<OBJECT id="VIDEO" width="320" height="45" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">');
document.write('<PARAM NAME="url" VALUE="' + name + '">');
document.write('<PARAM NAME="autostart" VALUE="true">');
document.write('<PARAM name="uimode" value="full">');
document.write('<PARAM name="volume" value="100">');
document.write('<PARAM name="windowlessvideo" value="true">');
document.write('<PARAM name="playcount" value="1">');
document.write('<PARAM name="enablecontextmenu" value="false">');
document.write('</OBJECT>');

}
function writeSoundObject() {
	document.write('<embed name="clicksound" src="_EXT/click.wav" loop="false" autostart="false" hidden="true" mastersound></embed>');
}
function menuMouse(sender, img) {
	sender.src = "_IMAGES/" + img;
}
function preload() {
	var arImages = new Array();
	var temp = new Array('miketa2_home_over.jpg','miketa2_about_over.jpg','miketa2_work_over.jpg','miketa2_contact_over.jpg','miketa2_guestbook_over.jpg');
	for(x=0; x < temp.length; x++) {
		arImages[x] = new Image();
		arImages[x].src = temp[x];
	}
}
function checkSound() {
	if(top.location.href == document.location.href) {
		document.getElementById("nosound").style.display = 'none';
	}
}
function doSound() {
	if(parent.frmSound.document) {
		parent.frmSound.document.all.music.src='_EXT/click.wav'
	}
}
function showImg(img, width, height) {
	schermX = (window.screen.availWidth - 10 - width) / 2;
	schermY = (window.screen.availHeight - 36 - height) / 2;
	var scrollbars = 0;
	var heightAdjusted = false;
	var widthAdjusted = false;
	if(width > (window.screen.availWidth - 10)) {
		widthAdjusted = true;
		width = window.screen.availWidth - 10;
		height = height + 21;
		heightAdjusted = true;
		scrollbars = 1;
	}
	if(height > (window.screen.availHeight - 36)) {
		height = window.screen.availHeight - 36;
		if(widthAdjusted == false) {
			width = width + 17;
		}
		scrollbars = 1;
	}
	if(schermX < 0 ) {
		schermX = 0;
	}
	if(schermY < 0) {
		schermY = 0;
	}
	window.open("showimg.php?img=" + img, "popup", "toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left=" + schermX + ",top=" + schermY + "");
}
function showMovie(movie, width, height) {
	height += 40;
	schermX = (window.screen.availWidth - 10 - width) / 2;
	schermY = (window.screen.availHeight - 36 - height) / 2;
	var scrollbars = 0;
	var heightAdjusted = false;
	var widthAdjusted = false;
	if(width > (window.screen.availWidth - 10)) {
		widthAdjusted = true;
		width = window.screen.availWidth - 10;
		height = height + 21;
		heightAdjusted = true;
		scrollbars = 1;
	}
	if(height > (window.screen.availHeight - 36)) {
		height = window.screen.availHeight - 36;
		if(widthAdjusted == false) {
			width = width + 17;
		}
		scrollbars = 1;
	}
	if(schermX < 0 ) {
		schermX = 0;
	}
	if(schermY < 0) {
		schermY = 0;
	}
	window.open("showmovie.php?movie=" + movie, "popup", "toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left=" + schermX + ",top=" + schermY + "");
}
function opengame() {
    var width = 600;
    var height = 350;
	schermX = (window.screen.availWidth - 10 - width) / 2;
	schermY = (window.screen.availHeight - 36 - height) / 2;
	var scrollbars = 0;
	var heightAdjusted = false;
	var widthAdjusted = false;
	if(width > (window.screen.availWidth - 10)) {
		widthAdjusted = true;
		width = window.screen.availWidth - 10;
		height = height + 21;
		heightAdjusted = true;
		scrollbars = 1;
	}
	if(height > (window.screen.availHeight - 36)) {
		height = window.screen.availHeight - 36;
		if(widthAdjusted == false) {
			width = width + 17;
		}
		scrollbars = 1;
	}
	if(schermX < 0 ) {
		schermX = 0;
	}
	if(schermY < 0) {
		schermY = 0;
	}
	window.open("showgame.php", "popup", "toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left=" + schermX + ",top=" + schermY + "");
}
function openSound(sound) {
    var width = 320;
    var height = 45;
	schermX = (window.screen.availWidth - 10 - width) / 2;
	schermY = (window.screen.availHeight - 36 - height) / 2;
	var scrollbars = 0;
	var heightAdjusted = false;
	var widthAdjusted = false;
	if(width > (window.screen.availWidth - 10)) {
		widthAdjusted = true;
		width = window.screen.availWidth - 10;
		height = height + 21;
		heightAdjusted = true;
		scrollbars = 1;
	}
	if(height > (window.screen.availHeight - 36)) {
		height = window.screen.availHeight - 36;
		if(widthAdjusted == false) {
			width = width + 17;
		}
		scrollbars = 1;
	}
	if(schermX < 0 ) {
		schermX = 0;
	}
	if(schermY < 0) {
		schermY = 0;
	}
	window.open("showsound.php?sound=" + sound, "popup", "toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + 20 + ",left=" + schermX + ",top=" + schermY + "");
}
function ta_length(sender) {
	document.getElementById('sign_left').innerHTML = (600-sender.value.length) + ' tekens over';
	if(sender.value.length > 600) {
		sender.value = sender.value.substr(0, 600);	
		document.getElementById('sign_left').innerHTML = '0 tekens over';
	}
}
preload();
