var intervalImap
var yellowBackLeft=720
var yellowBackWidth=320
var isImapBut=-1
var menuZiel=["default","0001","0002","0003"]
var isSite=0

function doByPrivateStart(){
	if(window.innerWidth){allW=window.innerWidth;allH=window.innerHeight}
	else{allW=document.body.offsetWidth-4;allH=document.body.offsetHeight-4}
	document.getElementById("crowdWhiteBack").style.width=allW
	document.getElementById("crowdBack").style.width=allW
	document.getElementById("mwTopBack").style.visibility="visible"
	doByPrivateResize()
}

function doByPrivateResize(){
	if(window.innerWidth){allW=window.innerWidth;allH=window.innerHeight}
	else{allW=document.body.offsetWidth-4;allH=document.body.offsetHeight-4}
	document.getElementById("mwTopBack").style.width=allW
	yL=allW-yellowBackWidth-20
	if(yL<620){yL=620}
	document.getElementById("mwMenuBack").style.left=yL
	document.getElementById("iframeBack").style.left=yL
	h=allH-517;if(h<1){h=0}
	if(allWidth<allW){
		document.getElementById("crowdWhiteBack").style.width=allW
		document.getElementById("crowdBack").style.width=allW
	}
}

function inSite_0(){
	HTMLstring=""
	HTMLstring+='<body id="bodyAll" style="background-color: #000000; overflow: hidden;)" onLoad="doByPrivateStart()" onResize="doByPrivateResize()">'
	HTMLstring+=drawDiv("mwTopBack",0,0,800,90,'#ffffff','','','0','','','normText',0,'','visibility: hidden')
		HTMLstring+=drawDiv("mwTitel",0,0,620,90,'','','','0','hand','','normText',1,'onclick="self.location=\'index.php\'"','background-image: url(bilder/musicworkx_titel.gif)')
		HTMLstring+=drawDiv("mwMenuBack",yellowBackLeft,0,yellowBackWidth,90,'#ffcc00','','','0','','','normText',0,'','')
			HTMLstring+=drawDiv("mwMenuBlackRand",yellowBackWidth-20,0,20,90,'#111111','','','0','','','normText',1,'','')
			HTMLstring+=drawDiv("mwMenuKerbeOben",yellowBackWidth-7,10,7,50,'','','','0','','','normText',1,'','background-image: url(bilder/kerbe_oben.gif)')
			yy=30
			officeButs=["Impressum","Kontakt","Newsletter"]
			for(n=0;n<officeButs.length;n++){
				action='onclick="openIframeBut(' + n + ')" onmouseover="decoFormat(1,\'butOfficeA' + n + '\')" onmouseout="decoFormat(0,\'butOfficeA' + n + '\')"'
				HTMLstring+=drawDiv("butOfficeA" + n,5,yy,120,15,'','#000000','','0','hand',officeButs[n],'normText',1,action,'')
				HTMLstring+=drawDiv("butOfficeP" + n,5,yy,120,15,'','#CAA200','','0','',officeButs[n],'normText',1,'','visibility: hidden')
				yy=yy+15
			}
			HTMLstring+=setEdit(1,yellowBackWidth-16,7)
		HTMLstring+='</div>'
	HTMLstring+='</div>'
	//HTMLstring+=setSite()
	HTMLstring+=drawDiv("iframeBack",yellowBackLeft,90,yellowBackWidth,410,'#ffcc00','','','0','','','normText',0,'','overflow: hidden; border-top: 1px solid #000000; visibility: hidden')
		HTMLstring+=drawDiv("mwMenuBlackRandIFrame",yellowBackWidth-20,0,20,410,'#111111','','','0','','','normText',1,'','')
		HTMLstring+=drawDiv("mwMenuBlackCopyrightIF",yellowBackWidth-20,20,20,230,'#000000','','','0','','','normText',1,'','background-image: url(bilder/copyright_musicworkx.gif);')
		action='onclick="closeIframe()" onmouseover="decoFormat(1,\'butCloseIframe\')" onmouseout="decoFormat(0,\'butCloseIframe\')"'
		HTMLstring+=drawDiv("iframeHeadBack",0,0,yellowBackWidth,20,'#111111','','','0','','','normTextBold',1,'','')
		HTMLstring+=drawDiv("butCloseIframe",yellowBackWidth-80,3,60,15,'','#ffcc00','','0','hand','schliessen','normTextBold',1,action,'text-align: right')
		HTMLstring+=drawDiv("headIframe",20,1,100,15,'','#ffcc00','','0','','','normTextBold',1,'','font-size: 10pt')
		HTMLstring+='<iframe name="iframeOffice" id="iframeOffice" src="blank.php?bGroundCol=FFCC00&unlink=no" style="position: absolute; left: 10px; top: 30px; width: ' + (yellowBackWidth-20) + 'px; height: 370px; background-color: #cccccc;" frameborder="0"></iframe>'
		HTMLstring+=drawDiv("mwMenuBlackBottomIFrame",0,390,yellowBackWidth,20,'#111111','','','0','','','normText',1,'','')
	HTMLstring+='</div>'
	xx=20;yy=108
	menu=["Home","Websites","Marketing","Social Networking"]
	for(n=0;n<menu.length;n++){
		action='onmouseover="changeMenuCol(' + n + ',1)" onmouseout="changeMenuCol(' + n + ',0)" onclick="self.location=\'index.php?site=' + menuZiel[n] +' \'"'
		cur="hand";bCol="#ffcc00";fCol="#000000"
		if(menuZiel[n]==isSite){action="";cur="";bCol="#000000";fCol="#ffcc00"}
		HTMLstring+=drawDiv("mwMainMenuBack" + n,xx,yy,100,16,bCol,'','','0','','','normText',0,'','')
			HTMLstring+=drawDiv("mwMainMenu" + n,0,1,100,14,'',fCol,'','0',cur,menu[n],'normTextBold',1,action,'text-align: center')
		HTMLstring+='</div>'
		xx=xx+102
	}
	HTMLstring+='</body>'
	return HTMLstring
}

function inSite_1(){
	HTMLstring=""
	return HTMLstring
}

function inSite_Headline(w,h){
	HTMLstring=""
	return HTMLstring
}

function inSite_Body(w,h){
	HTMLstring=""
	return HTMLstring
}

function inSite_2(){
	HTMLstring=""
	return HTMLstring
}
	
function inSite_3(){
	HTMLstring=""
	return HTMLstring
}

function goWeb(ziel){window.open(ziel)}

function openIframeBut(index){
	if(isImapBut>-1){
		document.getElementById("iframeOffice").src="blank.php?bGroundCol=FFCC00"
		obj=eval('document.getElementById("butOfficeP' + isImapBut + '")');obj.style.visibility="hidden"
		obj=eval('document.getElementById("butOfficeA' + isImapBut + '")');obj.style.visibility="visible"
	}
	isImapBut=index
	officeSites=["impressum.php","email.php","newsletter/newsletter.php"]
	document.getElementById("iframeOffice").src=officeSites[index] + "?isWidth=" + (yellowBackWidth-40) + "&isHeight=350&bGroundCol=FFCC00&textCol=000000"
	obj=eval('document.getElementById("butOfficeA' + isImapBut + '")');obj.style.visibility="hidden"
	obj=eval('document.getElementById("butOfficeP' + isImapBut + '")');obj.style.visibility="visible"
	obj=eval('document.getElementById("butOfficeA' + isImapBut + '")');document.getElementById("headIframe").innerHTML=obj.innerHTML
	imapHeight=0
	obj=document.getElementById("iframeBack");obj.style.height=imapHeight;obj.style.visibility="visible"
	intervalImap=window.setInterval(resizeImapOpen,1)
}

function openIframeEx(src,titel){
	document.getElementById("iframeOffice").src=src + "&isWidth=" + (yellowBackWidth-40) + "&isHeight=350&bGroundCol=FFCC00&textCol=000000"
	document.getElementById("headIframe").innerHTML=titel
	imapHeight=0;obj=document.getElementById("iframeBack");obj.style.height=imapHeight;obj.style.visibility="visible"
	intervalImap=window.setInterval(resizeImapOpen,1)
}

function resizeImapOpen(){
	obj=document.getElementById("iframeBack");imapHeight=imapHeight+16
	if(imapHeight>410){imapHeight=410;window.clearInterval(intervalImap)};obj.style.height=imapHeight
}

function closeIframe(){
	imapHeight=410;obj=document.getElementById("iframeBack")
	obj.style.height=imapHeight;obj.style.visibility="visible";document.getElementById("iframeOffice").src="blank.php?bGroundCol=FFCC00"
	intervalImap=window.setInterval(resizeImapClose,1)
}

function resizeImapClose(){
	obj=document.getElementById("iframeBack");imapHeight=imapHeight-16
	if(imapHeight<1){
		imapHeight=0;window.clearInterval(intervalImap);obj.style.visibility="hidden"
		if(isImapBut>-1){
			obj=eval('document.getElementById("butOfficeP' + isImapBut + '")');obj.style.visibility="hidden"
			obj=eval('document.getElementById("butOfficeA' + isImapBut + '")');obj.style.visibility="visible"
			isImapBut=-1
		}
	}
	obj.style.height=imapHeight
}

function changeMenuCol(index,typ){
	col=["#ffcc00","#000000"]
	obj=eval('document.getElementById("mwMainMenuBack' + index + '")')
	obj.style.backgroundColor=col[typ]
	obj=eval('document.getElementById("mwMainMenu' + index + '")')
	obj.style.color=col[1-typ]
}

