


//by moove 2005
_actors=new Array('anschließend im Programmenü unter <b>„Akteur“</b> --> <b>„Andere...“</b> auswählen','choose downloaded piece from <b>"Actor"</b> --> <b>"Other..."</b>')
_actors1=_actors
_actors2=_actors
_outfits=new Array('anschließend <b>„Akteur“</b> --> <b>„Akteurstudio"</b> auswählen','choose downloaded piece from <b>"Actors"</b> --> <b>"ActorStudio"</b>')

_furniture=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Möbel“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Furniture"</b>')

_furniture_deco=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Dekorationen“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Decorations"</b>')

_gadgets=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Gegenstände“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Gadgets"</b>')
_carpets=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Teppiche“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Carpets"</b>')
_deco=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Dekorationen“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Decorations"</b>')
_deco1=_deco
_deco2=_deco
_doors=new Array('anschließend im Programmenü unter <b>„Raum“</b> --> <b>„Türen“</b> auswählen','choose downloaded piece from <b>"Room"</b> --> <b>"Doors"</b>')
_sounds=new Array("  "," ")
_misc=new Array('  ','  ')
_developer=new Array('','')
_externals=new Array('','')
_actorstudio=new Array('anschließend im Programmenü unter <b>„Akteur“</b> --> <b>„Meine Akteure“</b> auswählen','choose downloaded piece from <b>"Actor"</b> --> <b>"My Actors"</b>')

//_carpets=new Array('anschließend im Programmenü unter <b>„Möbel“</b> --> <b>„Teppiche“</b> auswählen','choose downloaded piece from <b>"Furniture"</b> --> <b>"Carpets"</b>')

A_furniture=new Array("Seats","Tables","Cupboards","Kitchen","Beds","Bedsteads","Headparts","Mattress","Others...")
A_furniture49=new Array("Sitzmöbel","Tische","Schränke","Küche","Betten","Bettgestelle","Kopfteile","Matratzen","Diverses")
A_h_furniture=new Array("furniture_seats.htm","furniture_tables.htm","furniture_cupboards.htm","furniture_kitchen.htm","furniture_beds.htm","furniture_bedsteads.htm","furniture_headparts.htm","furniture_mattress.htm","furniture_misc.htm")
A_id_furniture=new Array("furniture1","furniture2","furniture3","furniture4","furniture5","furniture7","furniture8","furniture9","furniture6")

A_carpets=new Array("Modern","Fancy","For children","Fleece","Oriental","Flags")
A_carpets49=new Array("Modern","Besondere Formen","Für Kinder","Tierfelle","Orient","Flaggen")
A_h_carpets=new Array("carpets_modern.htm","carpets_specials.htm","carpets_forKids.htm","carpets_fleece.htm","carpets_oriental.htm","carpets_flags.htm")
A_id_carpets=new Array("carpets1","carpets2","carpets3","carpets4","carpets5","carpets6")


A_actors=new Array("Non Actorstudio Actors","Funactors")
A_actors49=new Array("Komplett Akteure","Fun-Akteure")
A_id_actors=new Array("actors1","actors2")
A_h_actors=new Array("actors_life.htm","funactors_life.htm")


A_deco=new Array("Pillow","Wall Decoration","Windows and Curtains","Others")
A_deco49=new Array("Kissen","Wanddekorationen","Fenster und Vorhänge","Andere")
A_id_deco=new Array("deco1","deco2","deco3","deco4")
A_h_deco=new Array("deco_pillow.htm","deco_walldecorations.htm","deco_windows.htm","deco_others.htm")


A_doors=new Array("Standard","Maple","Beech","Oak","Ash","Cherry","Mahogany","Nut","Teak","White","Double","Others")
A_doors49=new Array("Standard","Ahorn","Buche","Eiche","Esche","Kirsche","Mahagoni","Nuss","Teak","Weiß","Doppel","Diverses")

A_id_doors=new Array("doors1","doors2","doors3","doors4","doors5","doors6","doors7","doors8","doors9","doors10","doors11","doors12")
A_h_doors=new Array("doors_standard.htm","doors_maple.htm","doors_beech.htm","doors_oak.htm","doors_ash.htm","doors_cherry.htm","doors_mahogany.htm","doors_nut.htm","doors_teak.htm","doors_white.htm","doors_double.htm","doors_others.htm")



if(lang=="english")
{
var g_sWarnTimeOut="Sorry, the operation failed:\nPlease try again.";
var c_Text="To download files from the shop, \nRoomancer needs to be running.\n\nDo you want to start Roomancer now? ";
var switchText="<b>Enable all objects for download again.</b>";
var WarnSrc="getadvanced_browser.htm"
}
else
{
var g_sWarnTimeOut="Leider fehlgeschlagen:\nBitte wiederholen.";
var c_Text="Die Installation des gewünschten Teils\nkann nur mit Hilfe von Roomancer erfolgen.\n\nSoll Roomancer jetzt gestartet werden?";
var switchText="<b>Alle Objekte zum erneuten Download freischalten.</b>";
var WarnSrc="getadvanced_browser49.htm"
}
var	g_bRose=false;
var g_dStart;
var c;
var g_o,mX,mY,oDimX,oDimY,oDimMX,oDimMY,oPosX,oPosY,oPosMX,oPosMY,oSource,oAid;
invg=0
lastSub="actors1"
document.onmousemove = doCoordParent;

var g_bIE=(document.all);


window.onerror=errorHandler;



function doCoordParent(e)
{




    	if(g_bIE)
	{
	 x=event.clientX;
	 y=event.clientY;
	}
   	else
	{
	  x=e.clientX;
	  y=e.clientY;
	}

	doCoord(x,y,"top");


param="top"
doCoord(x,y,param)

}

oTestV=0

function doCoord(x,y,param)
{
if(param=="unten")
{
x=x+1
y=y+ 97
}
mX=x
mY=y

//window.status=mY+"-"+oPosMY+"-"+eval(oPosMY+oDimMY)+"_"+document.getElementById("ifr").clientHeight
if(oTestV==1)
{

	if((mX<oPosMX+2) || (mY<oPosY) || (mY>oPosMY+oDimMY) || (mX>oPosMX+oDimMX) || ((mX>oDimX+oPosMX) && (mY<oPosMY+4)) )
	{

		out()

	}

}

}

document.onselectstart = doSelectTest;
function doSelectTest() 
{
	 return (null == event.srcElement)
}




function errorHandler(message,url,line)
{
if(document.all)
{
	if(g_bRose)
	{
		g_bRose = false;
		var nD = new Date();
		if(nD.getTime()-g_dStart.getTime() <2000)
		{
			open(WarnSrc,null,"scrollbars=1,toolbar=0,width=640,height=400,resizable=0");
		}
		else
		{
			alert(g_sWarnTimeOut);
		}
		return true;
	}
	g_o.style.cursor="Hand";
	open(WarnSrc,null,"scrollbars=1,toolbar=0,width=640,height=400,resizable=0");
	return true;
}
}


function doit(d)
{
g_o=d;
if(d.style.cursor=="hand")
{
	s=d.src;
	sL=s.length;


//	g_o.style.cursor="default";



	if(Unten.name=="outfits")
		{
		if(lang=="german")
			{w='"' + s.substring(0,sL-4)+'_49.MPZ"';}
			else
			{w='"' + s.substring(0,sL-3)+'MPZ"';}
		}
		else
		{
		w='"' + s.substring(0,sL-3)+'MPZ"';
		}

	c="RoseCommand21.ExecuteAdvanced(99999,"+ w + ", 10000)";
	ind=RoseCommand21.IsBrowserOnAdvanced()
	if(ind==0)
		{
		warn=window.confirm(c_Text);
		if(warn==true)
			{
				g_dStart = new Date();
				g_bRose=true;
				eval(c)
				g_bRose=false;
				setCookie(g_o)
				g_o.style.cursor="default";
				isCookie()
			}else
			{g_o.style.cursor="Hand";}
		}
		else
		{
			g_dStart = new Date();
			g_bRose=true;
			eval(c);
			g_bRose=false;
			if((Unten.name!="developer") && (Unten.name!="externals") && (Unten.name!="misc"))
			{
			setCookie(g_o)
			g_o.style.cursor="default";
			isCookie()
			}
		}
}
}


function doit2(d,e)
{
g_o=d;
if(d.style.cursor=="hand")
{
	s=d.src;
	sL=s.length;
//	g_o.style.cursor="default";
	w=s.substring(0,sL-3)+e;
	location.href=w
	if((Unten.name!="developer") && (Unten.name!="externals") && (Unten.name!="misc"))
	{
	setCookie(g_o)
	g_o.style.cursor="default";
	isCookie()
	}
}
}
var L,uID;




function changeIt(o,l,s)
{
uID=Unten.uName

L=l

	o=eval(o)

	if(o.parentElement.getAttribute("status")!="under")
		{
			pID="_"+o.parentElement.id;

		}
		else
		{
			pID="_"+ newc
		}


	if(Unten.uName=="furniture7" || Unten.uName=="furniture8" )
	{
	pID=pID+"_deco"
	}

	if(Unten.name=="developer")
	{
	noteTxt='Download and unzip the ZIP files.'
	noteTxt_49='Downloaden und entpacken Sie bitte die "ZIP"-Dateien.'
	}
	else
	{
	noteTxt='Click on preview picture and download the files<br>'
	noteTxt_49='Vorschaubild des gewünschten Teils anklicken und downloaden <br>';
	}



if(s=="start")
{

	if(lang=="english")
	{
	document.getElementById("note").innerHTML=noteTxt
	document.getElementById("infotext").innerHTML=eval(pID.toString()+"[1]");

	}else
	{
	document.getElementById("note").innerHTML=noteTxt_49
	document.getElementById("infotext").innerHTML=eval(pID.toString()+"[0]");
	}

}
	if(o.parentElement.getAttribute("status")!="under")
	{
		oldc=newc;
		//newc=o.parentNode.id;
	}

	eval('document.getElementById("'+oldc+'").style.backgroundColor=""');
	oldd1=eval('document.getElementById("'+oldc+'").childNodes[0]');
	oldd2=oldd1.childNodes[0];

	oldd2.style.color=col1off;
	o.childNodes[0].style.color=col2off;
	o.parentNode.style.backgroundColor=col0bckgr

	if(o.parentElement.getAttribute("status")!="under")
	{
		newc=o.parentNode.id;

	}

	if(l!="")
	{
		Unten.location=L;
		if(o.parentElement.getAttribute("menue")=="no")
		{lastSub=""}
		Unten.document.getElementById("stopper").style.display="";
	}

		
}



function openIt(l)
{
	open(l,null,"scrollbars=1,toolbar=0,width=640,height=480,resizable=1");
}


function nDim(Dx,Dy)
{
oDimMX=Dx;
oDimMY=Dy;
//Unten.hideIt(1);
oTestV=1
}


function makeBg(o)
{
if(Unten.free=="TRUE")
{

	if(o.parentNode.getAttribute("menue")=="yes")
	{
	atr=o.parentNode.getAttribute("list")
	w=0

		//for (i=0; i<atr; i++) 
		//{
			//if(o.parentNode.parentNode.childNodes[i].tagName!="undefined")
			//{

			//w=w+o.parentNode.parentNode.childNodes[i].clientWidth+1

			//}

		//}

	H=document.getElementById("oTable").clientHeight-document.getElementById("ifr").clientHeight;

	oPosMX=o.parentNode.offsetLeft

	oPosMY=H;

	oDimX=o.parentNode.clientWidth+2;

	oDimY=o.parentNode.clientHeight;

	oDimMX=oDimX
	oDimMY=0

	oPosX=oPosMX-oDimX;
	oPosY=oPosMY-oDimY



	_l=eval("A_"+o.parentNode.id)

	n=_l.length
	TableContent=""

	for(i=0; i<n; i++)
		{

			DIV_style=" style='cursor:hand;padding-left:10;padding-right:10;padding-top:5;padding-bottom:5;border-top: 1 solid "+col1bckgr+"'"
			DIV_style2=" style='background:none;cursor:default;padding-left:10;padding-right:10;padding-top:5;padding-bottom:5;border-top: 1 solid "+col1bckgr+"'"
			F_style=" style='font-size:10 px;font-family:Verdana;font-weight:bold;color:"+col1off+";width:100%;height:100%''"
			F_style2=" style='font-size:10 px;font-family:Verdana;font-weight:bold;color:"+col0off+";width:100%;height:100%''"
			oid=eval("A_id_"+o.parentNode.id+"["+i+"]")

			link=eval("A_h_"+o.parentNode.id+"["+i+"]")
			if(oid==uID)
				{
				P1="<tr><td id="+oid+" status='under' ><div"+DIV_style2+"  ><font "+F_style2+">"
				}
				else
				{P1="<tr><td id="+oid+" status='under' ><div"+DIV_style+" onclick=changeIt(this,'"+link+"') onmouseover=mDeco(this,1) onmouseout=mDeco(this,0) ><font "+F_style+">"}

				P2="</font></div></td></tr>"
				if(lang=="english")
					{
						TableContent=TableContent+P1+eval("A_"+o.parentNode.id+"["+i+"]")+P2
					}
					else
					{
						TableContent=TableContent+P1+eval("A_"+o.parentNode.id+"49["+i+"]")+P2	
					}
			}
		T_style=" style='background:"+col1bckgr+";border-left:1 solid black;border-right:1 solid black;border-bottom:1 solid black'"

		TableContent="<table id='mTable' cellspacing='0' cellpadding='0'"+T_style+"><tr><td height='10'></td></tr>"+TableContent+"<tr></tr></table>"

		Unten.buildIt(TableContent,oDimX,oPosMX-1)


	}
	else
	{
	Unten.hideIt(0);
	}

	x=o.parentNode.id;

	if(x!=newc)
	{	
		o.childNodes[0].style.color=col1on
		o.parentNode.style.backgroundColor=col2on ;
	}
oB=o
}
}

function noBg(o)
{
if(Unten.free=="TRUE")
{

	x=o.parentNode.id

	if(x!=newc)
	{
		o.childNodes[0].style.color=col1off
		o.parentNode.style.backgroundColor=col2off ;
		if(o.parentNode.getAttribute("menue")=="yes")
		{
		o.childNodes[0].style.color=col1on
		o.parentNode.style.backgroundColor=col2on;
		}
	}
	else
	{

	}
}
}

var oB
function Letitbe()
{

	x=oB.parentNode.id;

	if(x!=newc)
	{	
		oB.childNodes[0].style.color=col1on
		oB.parentNode.style.backgroundColor=col2on ;
	}

}

function out()
{

	x=oB.parentNode.id;

	if(x!=newc)
	{	
			oB.childNodes[0].style.color=col1off
			oB.parentNode.style.backgroundColor=col2off ;

	}
oTestV=0
Unten.hideIt(0)

}


ftPage=""

function clearIt()
{
if(window.Unten.name!="misc" && window.Unten.name!="developer")
{
ftPage=""
text=document.cookie.toString()
newArray=text.split(",")
checker=""
oNumber=newArray.length-1
end=Unten.pageNr.length
for(var i=0; i<=oNumber; i++)
{
	oStr=newArray[i]

	if(oStr.slice(0,end)==Unten.pageNr)
	{

		oStr=eval("Unten."+oStr)
		oStr.style.filter="xray";
		oStr.style.cursor="default";
		oStr.parentNode.style.backgroundColor="black" ;
		ftPage="TRUE"



	}
}
}
Unten.document.getElementById("stopper").style.display="none"
}

function setCookie(d)
{

if(window.Unten.name!="misc" && window.Unten.name!="developer")
{
var cook = d.id+",";
//document.cookie +=cook+';expires=Wed, 01-Jan-2027 00:00:00 GMT; path=/;';
document.cookie +=cook+'; path=/;';
ftPage="TRUE";
}
}


function isCookie()
{

   if(ftPage=="TRUE")
   {

	if(window.Unten.name!="misc" && window.Unten.name!="developer")
	{

		if(document.cookie.length>0)
			{

			Unten.switchit.innerHTML=switchText;
			Unten.switchit.style.display="";
			}
	
	}
	else
	{

	Unten.document.switchit.style.display="none";
	}
   }

}



function setLastSub(i)
{
lastSub=i
}


