// JavaScript Document
// (c) Mag. Andreas Unterhuber
// http://blog.directorgate.com

var menunr = 1;
//var mapscode = "<iframe width='528' height='258' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.com/maps?f=q&amp;hl=de&amp;geocode=&amp;q=Laurinstra%C3%9Fe+54,+39012+Meran&amp;sll=37.0625,-95.677068&amp;sspn=40.953203,64.072266&amp;ie=UTF8&amp;t=h&amp;g=Laurinstra%C3%9Fe+54,+39012+Meran&amp;s=AARTsJqW5ztU9sxpu2q06BGyX_FbZdaBYA&amp;ll=46.688073,11.151381&amp;spn=0.01519,0.045319&amp;z=14&amp;iwloc=addr&amp;output=embed'></iframe>";
var mapscode = "<iframe width='528' height='258' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.de/maps?f=q&amp;source=s_q&amp;hl=de&amp;geocode=&amp;q=39012+Meran,+Laurinstrasse,+54&amp;sll=51.151786,10.415039&amp;sspn=20.064233,43.813477&amp;ie=UTF8&amp;s=AARTsJpryYwGvzHz8pzjLuecdrZ3sc_t1g&amp;ll=46.688073,11.151381&amp;spn=0.020607,0.036478&amp;z=14&amp;iwloc=addr&amp;output=embed'></iframe>";
var mapscodeIT = "<iframe width='528' height='258' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://www.google.de/maps?f=q&amp;source=s_q&amp;hl=it&amp;geocode=&amp;q=39012+Merano,+Via+Laurin,+54&amp;sll=46.688073,11.151381&amp;sspn=0.044864,0.080338&amp;g=39012+Meran,+Laurinstrasse,+54&amp;ie=UTF8&amp;s=AARTsJrZkdPr632ogkfkzHnGL0y_QAle0g&amp;ll=46.688073,11.151381&amp;spn=0.01519,0.045319&amp;z=14&amp;iwloc=addr&amp;output=embed'></iframe>";


function dg(obj){return document.getElementById(obj);}

function hMaps(){if (dg('Flash')) dg('Flash').innerHTML = mapscode; }
function hMapsIT(){if (dg('Flash')) dg('Flash').innerHTML = mapscodeIT; }

function colorMe(ID){if (ID != menunr) dg('MenuItem' + ID).style.backgroundColor = '#CCCCCC';}
function colorMeN(ID){if (ID != menunr) dg('MenuItem' + ID).style.backgroundColor = '';}
function colorMeL(ID){if (ID != menunr) dg('MenuItem' + ID).style.backgroundImage = 'none';}
function colorMeNL(ID){if (ID != menunr) dg('MenuItem' + ID).style.backgroundImage = 'url(../Pictures/ManueBG.gif)';}

function tM(obj) {if (obj != menunr) obj.style.color = '#000000';}
function tMn(obj) {if (subFunc(obj)) obj.style.color = '#ffffff';}

function vSm(){dg('subMenu').style.visibility = 'visible';}
function hSm(){dg('subMenu').style.visibility = 'hidden';}

function vSm2(){dg('subMenu2').style.visibility = 'visible';}
function hSm2(){dg('subMenu2').style.visibility = 'hidden';}

function doMenu(menunr) {if (dg('MenuItem' + menunr)) {dg('MenuItem' + menunr).style.backgroundColor = '#CCCCCC'; dg('MenuItem' + menunr).childNodes[0].style.color = '#000000';}}
function subFunc(obj){
	if (dg('MenuItem' + menunr)) 
	{return dg('MenuItem' + menunr).childNodes[0] != obj;} 
	else return true;}
	

function hideThemAll(){
	Element.hide('partCR');
	Element.hide('partCE');
	Element.hide('partTM');
	Element.hide('partTS');
	Element.hide('partGM');
	Element.hide('partSE');
	}
	
function runHm(objNr){
	if (dg('Hm' + objNr)) {
		dg('Hm' + objNr).style.color = '#ffffff';
	}
}

// ##################################################
// 			Some Code
// ##################################################

function popUp(url) {
	window.open(url,"redRef","height=600,width=550,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0," + "resizable=0,scrollbars=1,status=1,toolbar=0");
}

function hFlash(){if (dg('Flash')) dg('Flash').innerHTML = '<img src="Pictures/Gal-Top4.jpg" alt="Markus Bauer" width="528" height="258" />'; }

function showVideo(VideoNr) {
    new Effect.Appear('video');
    //if (dg('movie').style.display == 'none') dg('movie').style.display = '';
	setTimeout(function() {
	var posterlessMovie = AC.Quicktime.packageMovie('BauerMarkus', 'Video/0'+VideoNr+'_75.mov', {width: 500, height: 375, autoplay: true});
	$('movie').appendChild(posterlessMovie);
	}, 2000);
}
function hideVideo() {
    dg('movie').removeChild(dg('movie').firstChild);
    new Effect.Fade('video');
}