	var isRunning = false;

	function ShowAjaxSpecialProduct(TreeNodeID, VariantTreeNodeID, page, pid, Control)
	{
		var Design;
		Loaded = false;

		// Design der Produktansicht (beliebig erweiterbar) => Bitte auch in Update berücksichtigen
		if (document.location.href.indexOf("tr.to_look") > 0 || document.location.href.indexOf("tr.to_love") > 0)
			Design = 'TOLOOK';
		else if (document.location.href.indexOf("http://www.frontlineshop.com/index.php?") == -1 || document.location.href.indexOf("ho.home") > 0 || document.location.href.indexOf("me.home") > 0 || document.location.href.indexOf("wo.home") > 0 || document.location.href.indexOf("or.trolley") > 0 )
			Design = 'DEFAULT';
		else
			Design = "DEFAULT";
		
		new Ajax.Request
		(
			'http://www.frontlineshop.com/index.php?screen=ho.ajaxcountdown&task=product&TreeNodeID='+TreeNodeID+'&VariantTreeNodeID='+VariantTreeNodeID+'&page='+page+'&pid='+pid+'&Design='+Design,
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						if (typeof(Control) == 'undefined')
						{
							ShowProductControl.open();
							document.getElementById('ItemForm').innerHTML = unescape(data.CONTENT);
							
						} // if (typeof(Control) == 'undefined')
						else
						{
							var DivName = 'ItemForm'+TreeNodeID;
							Control.open();
							document.getElementById(DivName).innerHTML = unescape(data.CONTENT);
						} // else [if (typeof(Control) == 'undefined')]


						var PhotoViewerPhoto = document.getElementById('PhotoViewerPhoto')
						if (PhotoViewerPhoto)
							closeViewer();

						//Omniture
						s.hier1 = unescape(data.SHIER1);
						s.prop1 = unescape(data.SPROP1);
						s.prop2 = unescape(data.SPROP2);
						s.prop3 = unescape(data.SPROP3);
						s.prop4 = unescape(data.SPROP4);
						s.prop5 = unescape(data.SPROP5);
						s.eVar3 = unescape(data.SEVAR3);
						s.events = 'prodView,event3'; //Events für Produktansicht
						s.products = unescape(data.SPRODUCTS);
						s.t();						
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
	} // function ShowAjaxSpecialProduct(ItemNo, page, pid)


	function UpdateAjaxSpecialProduct(TreeNodeID, VariantTreeNodeID, Color, page, pid)
	{
		var UpdateVariantTreeNodeID;
		var Design;
		
		if (Color == '' && VariantTreeNodeID != '')
			UpdateVariantTreeNodeID = 0;
		else
			UpdateVariantTreeNodeID = 1;
			
		// Design der Produktansicht (beliebig erweiterbar)
		if (document.location.href.indexOf("tr.to_look") > 0 || document.location.href.indexOf("tr.to_love") > 0)
			Design = 'TOLOOK';
		else if (document.location.href.indexOf("http://www.frontlineshop.com/index.php?") == -1 || document.location.href.indexOf("ho.home") > 0 || document.location.href.indexOf("me.home") > 0 || document.location.href.indexOf("wo.home") > 0 || document.location.href.indexOf("or.trolley") > 0)
			Design = 'DEFAULT';
		else
			Design = "DEFAULT";	
	
		new Ajax.Request
		(
			'http://www.frontlineshop.com/index.php?screen=ho.ajaxcountdown&task=product&TreeNodeID='+TreeNodeID+'&page='+page+'&pid='+pid+'&Design='+Design
			+'&VariantTreeNodeID='+ VariantTreeNodeID+'&UpdateVariantTreeNodeID='+UpdateVariantTreeNodeID+'&Color='+escape(Color),
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						try
						{
							document.getElementById('ItemForm').innerHTML = unescape(data.CONTENT);
						} // try
						catch(e)
						{
							var DivName = 'ItemForm'+TreeNodeID;
							document.getElementById(DivName).innerHTML = unescape(data.CONTENT);
						} // catch(e)
						
						//Omniture
						s.hier1 = unescape(data.SHIER1);
						s.prop1 = unescape(data.SPROP1);
						s.prop2 = unescape(data.SPROP2);
						s.prop3 = unescape(data.SPROP3);
						s.prop4 = unescape(data.SPROP4);
						s.prop5 = unescape(data.SPROP5);
						s.eVar3 = unescape(data.SEVAR3);
						s.events = 'prodView,event3'; //Events für Produktansicht
						s.products = unescape(data.SPRODUCTS);
						s.t();						
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
	} // function UpdateProduct(TreeNodeID, VariantTreeNodeID, Color, page, pid)

	function ShowAjaxCountdownProducts(page, gender)
	{
		new Ajax.Request
		(
			'http://www.frontlineshop.com/index.php?screen=ho.ajaxcountdown_products&Page='+page+'&Gender='+gender,
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						if (gender == 'men')
						{
							document.getElementById('Product1Men').innerHTML = unescape(data.PRODUCT1);
							document.getElementById('Product2Men').innerHTML = unescape(data.PRODUCT2);
							document.getElementById('NextPageMen').href = unescape(data.NEXT);
							document.getElementById('PrevPageMen').href = unescape(data.PREV);
						}
						else
						{
							document.getElementById('Product1Women').innerHTML = unescape(data.PRODUCT1);
							document.getElementById('Product2Women').innerHTML = unescape(data.PRODUCT2);
							document.getElementById('NextPageWomen').href = unescape(data.NEXT);
							document.getElementById('PrevPageWomen').href = unescape(data.PREV);
						}						
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
	} // function ShowAjaxSpecialProduct(ItemNo, page, pid)
	
	function ShowAjaxCountdownProductsSmall(page, gender)
	{
		var url = 'http://www.frontlineshop.com/index.php?screen=sp.ajaxcountdown_products_small&Page='+page;
		
		if(gender)
			 url += '&Gender='+gender
		
		new Ajax.Request
		(
			url,
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						document.getElementById('NextPage').href = unescape(data.NEXT);
						document.getElementById('PrevPage').href = unescape(data.PREV);
						document.getElementById('Product1').innerHTML = unescape(data.PRODUCT1);
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
	} // function ShowAjaxCountdownProductsSmall(page, ScreenName)

	function ShowAjaxProductsSmall(page, ScreenName)
	{
		var url = 'http://www.frontlineshop.com/index.php?screen=sp.ajax_products_small&PromoPage='+page;
		
		if(screen)
			 url += '&ScreenName='+ScreenName
		
		new Ajax.Request
		(
			url,
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						document.getElementById('NextPage').href = unescape(data.NEXT);
						document.getElementById('PrevPage').href = unescape(data.PREV);
						document.getElementById('Product1').innerHTML = unescape(data.PRODUCT1);
						document.getElementById('Product2').innerHTML = unescape(data.PRODUCT2);
						document.getElementById('Product3').innerHTML = unescape(data.PRODUCT3);
						document.getElementById('Product4').innerHTML = unescape(data.PRODUCT4);
						
						
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
	} // function ShowAjaxProductsSmall(page, ScreenName)
	
	function ShowCountdownVideo(film, width, height)
	{
		document.globaldata.playerdiv.value = 'player';
		
		window.scrollTo(0,0);
		ShowVideoControl.open();
						
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
			'width', width,
			'height', height,
			'src', 'http://files.frontlineshop.com/Brandneu/frontlineflv.swf?skin_url=http://files.frontlineshop.com/Brandneu/SteelOverAll.swf&video_url=http://'+film,
			'quality', 'best',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'frontlineFLV',
			'bgcolor', '#d3d3d3',
			'name', 'frontlineFLV',
			'menu', 'false',
			'allowFullScreen', 'false',
			'allowScriptAccess','always',
			'movie', 'http://files.frontlineshop.com/Brandneu/frontlineflv.swf?skin_url=http://files.frontlineshop.com/Brandneu/SteelOverAll.swf&video_url=http://'+film,
			'salign', ''
		); //end AC code
	}
	
	function PromoActivate(PostingID)
	{
		var url = 'http://www.frontlineshop.com/index.php?screen=sp.ajaxcountdown_products_small&task=activate&pid='+PostingID;
		
		new Ajax.Request
		(
			url,
			{
				method : 'get',
				onSuccess: function(transport)
				{
					//alert(transport.responseText);
					var data = eval('('+transport.responseText+')'); 
					
					if (data.MESSAGE == "OK")
					{
						document.getElementById('activate').style.display='none';
					} // if (Meldung == "OK")
				} // onSuccess: function(transport)
			} // params
		); // // new Ajax Request
		
	}	
	
	function ShowLookBook(PostingID, ScreenArea)
	{
		if (isRunning == false)
		{
			isRunning = true;
			
			var url = 'http://www.frontlineshop.com/index.php?screen=sp.lookbook&PostingID='+PostingID+'&ScreenArea='+ScreenArea;
			new Ajax.Request
			(
				url,
				{
					method : 'get',
					onSuccess: function(transport)
					{
						var data = eval('('+transport.responseText+')'); 
						if (data.MESSAGE == "OK")
						{
							var muh = eval(unescape(data.JSCONTENT));
							try
							{
								window.document.body.removeChild(document.getElementById('PromoProducts'));
							}
							catch(e){}
	
							try
							{
								window.document.body.removeChild(document.getElementById('PhotoViewerPhoto'));
							}
							catch(e){}
							
							if (data.CONTENT != '')
							{	
								var Produktliste=window.document.createElement("div");
								Produktliste.id='PromoProducts';
								Produktliste.style.position="absolute";
								Produktliste.style.zIndex="18000";
								Produktliste.style.width="620px";
								Produktliste.style.backgroundColor="#ffffff";
								Produktliste.innerHTML = unescape(data.CONTENT);
								window.document.body.appendChild(Produktliste);
							} // if (data.CONTENT)
													
							void(viewer.show(0));
							
							isRunning = false;
							
						} // if (Meldung == "OK")
					} // onSuccess: function(transport)
				} // params
			); // // new Ajax Request
		} // if (isRunning == false)
	} // function ShowLookBook(PostingID)		
	