function getPageHeight() {
	var x,y;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight

	if (test1 > test2) {	// all but Explorer Mac 
		x = document.body.scrollWidth;
	} else {// Explorer Mac would also work in Explorer 6 Strict, Mozilla and Safari
		x = document.body.offsetWidth;
	}

	
	
	return x;	
}
	
function printThis() {

	
	document.getElementById('printVorname').childNodes[0].nodeValue = document.getElementById('ed_vorname').value;
	document.getElementById('printNachname').childNodes[0].nodeValue = document.getElementById('ed_nachname').value;
	document.getElementById('printGeschlecht').childNodes[0].nodeValue = document.getElementById('sl_geschlecht').options[document.getElementById("sl_geschlecht").selectedIndex].text;
	document.getElementById('printStrasse').childNodes[0].nodeValue = document.getElementById('ed_strasse').value;
	document.getElementById('printHausnummer').childNodes[0].nodeValue = document.getElementById('ed_hausnummer').value;
	document.getElementById('printPlz').childNodes[0].nodeValue = document.getElementById('ed_plz').value;
	document.getElementById('printStadt').childNodes[0].nodeValue = document.getElementById('ed_stadt').value;
	document.getElementById('printEmail').childNodes[0].nodeValue = document.getElementById('ed_email').value;
	document.getElementById('printVorwahl').childNodes[0].nodeValue = document.getElementById('ed_vorwahl').value;
	document.getElementById('printTelefonnr').childNodes[0].nodeValue = document.getElementById('ed_telefonnr').value;
	document.getElementById('printBeruf').childNodes[0].nodeValue = document.getElementById('ed_beruf').value;
	document.getElementById('printHobbies').childNodes[0].nodeValue = document.getElementById('ed_hobby').value;
	document.getElementById('printGrund').childNodes[0].nodeValue = document.getElementById('ed_grund').value;
	document.getElementById('printGroesse').childNodes[0].nodeValue = document.getElementById('ed_groesse').value;
	document.getElementById('printHuefte').childNodes[0].nodeValue = document.getElementById('ed_huefte').value;
	document.getElementById('printBauch').childNodes[0].nodeValue = document.getElementById('ed_bauch').value;
	document.getElementById('printBrust').childNodes[0].nodeValue = document.getElementById('ed_brust').value;
	document.getElementById('printKleidungsgroesse').childNodes[0].nodeValue = document.getElementById('ed_kleidungsgroesse').value;
	document.getElementById('printSchuhgroesse').childNodes[0].nodeValue = document.getElementById('ed_schuhgroesse').value;
	document.getElementById('printGebDatum').childNodes[0].nodeValue = document.getElementById('ed_geburtsdatum').value;
	document.getElementById('printTop100').childNodes[0].nodeValue = document.getElementById('sl_top100').options[document.getElementById("sl_top100").selectedIndex].text;

	
	
	document.images['printLayerBild'].src = document.images['LayerBild'].src
	document.images['printLayerBildPortrait'].src = document.images['LayerBildPortrait'].src

	document.getElementsByClassName('printImageName')[0].childNodes[0].nodeValue = document.getElementById('ed_vorname').value + " " + document.getElementById('ed_nachname').value;
	document.getElementsByClassName('printImageName')[1].childNodes[0].nodeValue = document.getElementById('ed_vorname').value + " " + document.getElementById('ed_nachname').value;
	
	window.print();

}
	
	

function closeLayer() {
	//alert("closeLayer():");
	document.getElementById("stage").style.display = 'none';
	document.getElementById("onStage").style.display = 'none';
	document.getElementById('fehlerBoxGeburtsdatum').style.display = "none";

	
	//document.images['LayerBild'].src = "";
//	document.images['LayerBildPortrait'].src = "";
	
	
//	datenArray = getAllData();
	
	
	document.getElementById("ed_strasse").value = "";
	document.getElementById("ed_hausnummer").value = "";
	document.getElementById("ed_plz").value = "";
	document.getElementById("ed_stadt").value = "";
	document.getElementById("ed_email").value = "";
	document.getElementById("ed_vorwahl").value = "";
	document.getElementById("ed_telefonnr").value = "";
	document.getElementById("ed_beruf").value = "";
	document.getElementById("ed_hobby").value = "";
	document.getElementById("ed_grund").value = "";
	document.getElementById("ed_groesse").value = "";
	document.getElementById("ed_huefte").value = "";
	document.getElementById("ed_bauch").value = "";
	document.getElementById("ed_brust").value = "";
	document.getElementById("ed_kleidungsgroesse").value = "";
	document.getElementById("ed_schuhgroesse").value = "";
	document.getElementById("ed_geburtsdatum").value = "";
	document.getElementById("hd_userid").value = "";
	document.getElementById("ed_vorname").value = "";
	document.getElementById("ed_nachname").value = "";
	
	document.getElementById("sl_geschlecht").selectedIndex = 0;
	document.getElementById("sl_top100").selectedIndex = 0; 
	

	
}


var aktLayerBild_body = "";
var aktLayerBild_portrait = "";

function showLayer(DatenArray)  {


	document.getElementById("hd_userid").value = DatenArray["userid"];
	document.getElementById("ed_vorname").value = DatenArray["firstname"];
	document.getElementById("ed_nachname").value = DatenArray["lastname"];
	
	geschlecht = document.getElementById("sl_geschlecht");

	if (DatenArray["gender"] == 'weiblich')
		geschlecht.selectedIndex = 0;
	else	
		geschlecht.selectedIndex = 1;


	
	document.getElementById("ed_strasse").value = DatenArray["street"];
	document.getElementById("ed_hausnummer").value = DatenArray["streetnr"];
	document.getElementById("ed_plz").value = DatenArray["zip"];
	document.getElementById("ed_stadt").value = DatenArray["city"];
	document.getElementById("ed_email").value = DatenArray["email"];
	document.getElementById("ed_vorwahl").value = DatenArray["phonecode"];
	document.getElementById("ed_telefonnr").value = DatenArray["phonenr"];
	document.getElementById("ed_beruf").value = DatenArray["profession"];
	document.getElementById("ed_hobby").value = DatenArray["hobbies"];
	document.getElementById("ed_grund").value = DatenArray["reason"];
	document.getElementById("ed_groesse").value = DatenArray["height"];
	document.getElementById("ed_huefte").value = DatenArray["hip"];
	document.getElementById("ed_bauch").value = DatenArray["waist"];
	document.getElementById("ed_brust").value = DatenArray["breast"];
	document.getElementById("ed_kleidungsgroesse").value = DatenArray["clothing_size"];
	document.getElementById("ed_schuhgroesse").value = DatenArray["shoes_size"];
	
	top100 = document.getElementById("sl_top100");

	if (DatenArray["is_top100"] == 'true') 
		top100.selectedIndex = 0;
	else	
		top100.selectedIndex = 1;

	document.getElementById("ed_geburtsdatum").value = DatenArray["date_of_birth"];
				
	

	document.images['LayerBild'].src = DatenArray["bildname"];
	document.images['LayerBildPortrait'].src = DatenArray["portraitBild"];

	aktLayerBild_body = DatenArray["body"];
	aktLayerBild_portrait = DatenArray["portrait"];
	
		
	obj = document.getElementById("stage");
	obj.style.height ="2000px";

	document.getElementById('onStage').style.display = "block";
	obj.style.display = "block";	
	
}

		
function generateLink(obj) {

	t1 = 	"filterStartDatumTag=" + document.getElementById("filterStartDatumTag").options[document.getElementById("filterStartDatumTag").selectedIndex].value;
	t2 =	"filterStartDatumMonat=" + document.getElementById("filterStartDatumMonat").options[document.getElementById("filterStartDatumMonat").selectedIndex].value;
	t3 =	"filterEndDatumTag=" + document.getElementById("filterEndDatumTag").options[document.getElementById("filterEndDatumTag").selectedIndex].value;
	t4 =	"filterEndDatumMonat=" + document.getElementById("filterEndDatumMonat").options[document.getElementById("filterEndDatumMonat").selectedIndex].value;
	
	obj.href = obj.href + "&"+t1 + "&"+t2 + "&"+t3 + "&"+t4;
}



function modEdit(obj) {

	if (obj.value == "suche")
		obj.value = "";
}



function showUploadStage() {
	document.getElementById('info').style.display = "block";
}

/**
*
*
*/



function ImageUpload() {
	userid = document.getElementById('hd_userid').value;
	openImagePopup(userid);
}

function openImagePopup (id) {
}

function newPopup(url,name, width, height) {
        var sizeX = width || 480;
        var sizeY = height || 765;
        var winX=screen.availWidth;
        var winY=screen.availHeight;
        var centerX=eval(winX/2-sizeX);
        var centerY=eval(winY/2-sizeY/2);
        var param ='resizable=no,top='+centerY+',left='+centerX+',width='+sizeX+',height='+sizeY+',scrollbars=yes';
        var newWin = window.open(url,name,param);
        newWin.focus();
}


function popItUp(ifBody) {
	if (ifBody) 
		win = newPopup('/_backoffice/popup/detailbild.html?src='  + aktLayerBild_body, "detailBild");
	 else
		win = newPopup('/_backoffice/popup/detailbild.html?src='  + aktLayerBild_portrait, "detailBild");
}


function highlight(obj) {
	obj.style.background='#c1d7ed';
}

function normalisiere(obj) {
		obj.style.background='#FFFFFF';
}

function openMicrosite(otto_sid, otto_ls, dsl){

}


function openUploadPopup(sessionkey){
}


function popup(url,popupname, width, height, scrollbars) {
	var popupname = popupname || 'PopUp';
	var width = width || 410;
	var height = height || 450;
	var scrollbars = scrollbars || 'auto';
	var xPos = (screen.availWidth - width) / 2
	var yPos = (screen.availHeight - height ) / 2
	window.open(url,popupname,'width='+width+',height='+height+',scrollbars='+scrollbars+',toolbar=no,menubar=no,screenX='+xPos+',screenY='+yPos+',left='+xPos+',top='+yPos);
}



function validateForm(formId) 
{ 
    
	obj = document.getElementById(formId);
	datum = document.getElementById('ed_geburtsdatum').value;

	if (datum != "") {
		muster =  /([0-9])?[0-9]\.([0-9])?[0-9]\.[0-9][0-9][0-9][0-9]/;


		ergebnis = datum.match(muster);
	
	
		ret = (ergebnis != null);
	
		if (!ret)
			document.getElementById('fehlerBoxGeburtsdatum').style.display = "block";

	} else
		ret = true;
		
			
	return  ret;
		
	
	
//	monatJahr = string.replace([^\.]*, '');
//	jahr = string.replace([0-9][0-9]\.);
	
	/* 
	if(!string) return false; 
    string += ''; 

    string = string.replace(/[^0-9^.]/g, ''); 

    var split = string.split("."); 
    var day = parseInt(split[0], 10); 
    var month = parseInt(split[1] || 0, 10); 
    var year = parseInt(split[2] || 0, 10); 

    if(isNaN(year)) year = (new Date()).getFullYear(); 

    var check = new Date(year, month - 1, day); 
    var day2 = check.getDate(); 
    var year2 = check.getFullYear(); 
    var month2 = check.getMonth() + 1; 


	
	ret = ((year == year2 || month == month2 || day == day2) && (day.length == 2 && month.length == 2 && year.length == 4));
*/

	
	
//	alert("Das Geburtsdatum hat leider ein falsches Format: TT.MM.JJJJ");
		
 
}



function translateForHBX(hbxStr){
	hbxStr = hbxStr.replace(/Ä/,"Ae");
	hbxStr = hbxStr.replace(/Ö/,"Oe");
	hbxStr = hbxStr.replace(/Ü/,"Ue");
	hbxStr = hbxStr.replace(/ä/,"ae");
	hbxStr = hbxStr.replace(/ö/,"oe");
	hbxStr = hbxStr.replace(/ü/,"ue");
	hbxStr = hbxStr.replace(/ß/,"ss");
	return hbxStr; 
}



//HBX Tracking Adapter for Flash
function trackPageView(pageName){
	
	
	pageName = pageName.replace(/ - /, '-');
	//alert("trackPageView() pageName="+pageName);
	var pageParts = pageName.split('-');

	var hbxCategory = (pageParts.length>1) ? pageParts[0]: "";
	var hbxPageName = (pageParts.length>1) ? pageParts[1] : pageName;



	if(hbxPageName.toLowerCase().indexOf("download")>=0){
		//alert("download:" + hbxPageName );
		_hbDownload(translateForHBX(hbxPageName));
	}
	else{
		_hbPageView(translateForHBX(hbxPageName), translateForHBX(hbxCategory));
		//alert("visit:" + translateForHBX(hbxCategory) +"/"+translateForHBX(hbxPageName) );
	}

	//_hbSet('c1', translateForHBX('Nina Müller|Vote'));
	//_hbSend();
	//_hbSet('c1', translateForHBX('Nina Müller|Vote|127.0.0.1'));
	//_hbSend();
	//_hbSet('c1', translateForHBX('Nina Müller|Vote|127.0.0.2'));
	//_hbSend();
	//_hbSet('c1', translateForHBX('Nina Müller|Detail'));
	//_hbSend();
	//alert("ok");


}


//HBX Tracking Adapter for Flash
function trackCinderella(action, cinderella){
	//alert("trackCinderella() action=" + action + "  cinderella=" +cinderella);
	action= (action=='vote')?'Vote':'Detail';
	var trackValue = translateForHBX(cinderella) + '|' + translateForHBX(action);
	//alert("track cinderella:" + trackValue);
	_hbSet('c1', trackValue);
	_hbSend();
}





//HBX Tracking Adapter for Flash
function trackProduct(productId){
	var trackValue = translateForHBX(productId) + '|' + translateForHBX('Detail');
	//alert(trackValue);
	_hbSet('c2', trackValue);
	_hbSend();
}


//will open a product in otto shop and track it in HBX
function gotoOttoShop(productId, shopId, sid, ls, fl){

	var shopLink = "";
	//alert(productId);
	switch(productId){
		case "285879"://Top Melrose
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo=285879&ls=0&CategoryName=sh1458583&";
			//"ShopID=sh1778855sp2964244&SpecialShopName=sh1778855#lmPromo=la,1,hk,sh1778855,fl,285879";
			shopId = "sh1778855sp2964244";
			break;
		case "285019"://Neckholder, melrose
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo=285019&ls=0&CategoryName=sh1458583&";
			//"ShopID=sh1778862sp2964276&SpecialShopName=sh1778862#lmPromo=la,1,hk,sh1778862,fl,285019";
			shopId = "sh1778862sp2964276";
			break;
		case "269208":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=wrt_AAABTE8AAAENKFBNPHrx&ProductPage=0&SpecialShopName=sh1778879";
			//"ShopID=sh1778879sp2924189&SpecialShopName=sh1778879#lmPromo=la,1,hk,sh1778879,fl,269208";
			shopId = "sh1778879sp2924189";
			break;
		case "223877":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=8i1_AAABnekAAAENAFdNPHrx&ProductPage=0&SpecialShopName=sh1778849";
			//"ShopID=sh1778849sp2964113&SpecialShopName=sh1778849#lmPromo=la,1,hk,sh1778849,fl,223877";
			shopId = "sh1778849sp2964113";
			break;
		case "809616":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=isx_AAABJ_kAAAENSUVNPHrx&ProductPage=0&SpecialShopName=sh1778909";
			//"ShopID=sh1778909sp2906391&SpecialShopName=sh1778909#lmPromo=la,1,hk,sh1778909,fl,809616";
			shopId = "sh1778909sp2906391";
			break;
		case "290328":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=dT1_AAAB59cAAAENKVNNPHrx&ProductPage=0&SpecialShopName=sh1778894";
			//"ShopID=sh1778894sp2940744&SpecialShopName=sh1778894#lmPromo=la,1,hk,sh1778894,fl,290328";
			shopId = "sh1778894sp2940744";
			break;
		case "715713":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=s.d_AAABH3kAAAENSEpNPHrx&ProductPage=0&SpecialShopName=sh1778843";
			//"ShopID=sh1778843sp2915712&SpecialShopName=sh1778843#lmPromo=la,1,hk,sh1778843,fl,715713";
			shopId = "sh1778843sp2915712";
			break;
		case "858336":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=Ih5_AAAB8vYAAAENH0tNPHrx&ProductPage=0&SpecialShopName=sh1778910";
			//"ShopID=sh1778843sp2964135&SpecialShopName=sh1778843#lmPromo=la,1,hk,sh1778843,fl,858336";
			shopId = "sh1778910sp2916615";
			break;
		case "581006"://Tasche
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo=581006&ls=0&CategoryName=1458583&";
			//"ShopID=sh1778912sp2959954&SpecialShopName=sh1778912#lmPromo=la,1,hk,sh1778912,fl,581006";
			shopId = "sh1778912sp2959954";
			break;
		case "242323":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=1X5_AAAB9rYAAAEN_2BNPHrx&ProductPage=0&SpecialShopName=sh1778930";
			//"ShopID=sh1778930sp2981493&SpecialShopName=sh1778930#lmPromo=la,1,hk,sh1778930,fl,242323";
			shopId = "sh1778930sp2981493";
			break;
		case "363876": //BH & String
		case "365742":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo=363876&ls=0&CategoryName=sh1458583&";
			//"ShopID=sh1778931sp2921737&SpecialShopName=sh1778931#lmPromo=la,1,hk,sh1778931,fl,363876";
			shopId = "sh1778931sp2921737";
			break;		
		case "430016":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=Pvl_AAAB8HkAAAENCWhNPHrx&ProductPage=0&SpecialShopName=sh1778932";
			//"ShopID=sh1778932sp2380081&SpecialShopName=sh1778932#lmPromo=la,1,hk,sh1778932,fl,430016";
			shopId = "sh1778932sp2380081";
			break;
		case "274672"://Kleid
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid=WqpeGLLEI9BYGPfBBaJyOKlo6SjX4WWm5nzeha3-CLX7Vlax3Ir1dL8cw3fhSw==?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=8i1_AAABnekAAAENAFdNPHrx&ProductPage=0&SpecialShopName=sh1778849";
			//"ShopID=sh1778932sp2380081&SpecialShopName=sh1778932#lmPromo=la,1,hk,sh1778932,fl,430016";
			shopId = "sh1778849sp2964285";

			productId = "223877";
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=8i1_AAABnekAAAENAFdNPHrx&ProductPage=0&SpecialShopName=sh1778849";
			//"ShopID=sh1778849sp2964113&SpecialShopName=sh1778849#lmPromo=la,1,hk,sh1778849,fl,223877";
			shopId = "sh1778849sp2964113";

			break;
		case "383503":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=Tvd_AAABNs4AAAENRFdNPHrx&ProductPage=0&SpecialShopName=sh1778935";
			//"ShopID=sh1778935sp2035431&SpecialShopName=sh1778935#lmPromo=la,1,hk,sh1778935,fl,383503";
			shopId = "sh1778935sp2035431";
			break;
		case "795149"://Anzug, Berto Lucci
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo=795149&ls=0&CategoryName=sh1458583&";
			//"ShopID=sh1778934sp2456723&SpecialShopName=sh1778934#lmPromo=la,1,hk,sh1778934,fl,795149";
			shopId = "sh1778934sp2456723";
			break;
		case "436089":
			shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-Start;sid="+sid+"?BundlePage=0&CategoryName=sh1458583&dynPageSize=12&ListSize=12&ls=0&ProductID=OQt_AAAB3TgAAAEN_EZNPHrx&ProductPage=0&SpecialShopName=sh1778936";
			//"ShopID=sh1778936sp2908726&SpecialShopName=sh1778936#lmPromo=la,1,hk,sh1778936,fl,436089";
			shopId = "sh1778936sp2908726";
			break;

	}

	

	var shopName = shopId.split('sp')[0];
	shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-CMSShopID;sid="+sid+"?ArticleNo="+productId+"&ls=0&CategoryName=sh1458596&ShopID="+shopId + "&SpecialShopName="+shopName+"#lmPromo=la,1,hk,"+shopName+",fl,"+productId;
	//alert(shopLink)


	if(top.opener){		
		top.opener.location.href = shopLink;		
		top.opener.focus();
		top.blur();
	}
	else
		window.open(shopLink);


	var trackValue = translateForHBX(productId) + '|' + translateForHBX('Order');
	//alert(trackValue);
	_hbSet('c2', trackValue);
	_hbSend();
}


function openMoreOffers(sid){

	shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_BrowseCatalog-Start;sid="+sid+"?CategoryName=sh1458583&ls=0&SpecialShopName=sh1590949#lmPromo=la,2,hk,Special_Cinderella_Popup,fl,ShopLink";


	if(top.opener){
		top.opener.location.href = shopLink;
		top.opener.focus();
		top.blur();
	}
	else
		window.open(shopLink);

	trackPageView("Kollektion - Zauberangebote");

	
}



function openSpecialOffer(otto_sid, productId){
	openSpecialOffer("openSpecialOffer");
	//alert(productId);

	var shopLink = "http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/OV_DisplayProductInformation-ProductRef;sid="+otto_sid+"?ProductRef="+productId+"4-0-4001@Otto-OttoDe&ls=0&SearchDetail=1&SearchDetail=one&stype=N&Orengelet.sortPipelet.sortResultSetSize=12&Orengelet.SimCategorize4OttoMsPipelet.Similarity_Parameter=&Orengelet.sortPipelet.sortCursorPosition=0&Query_Text="+productId+"&PriceLowerBound=9&PriceUpperBound=9";
	//alert(shopLink);



	if(top.opener){
		top.opener.location.href = shopLink;
		top.opener.focus();
		top.blur();
	}
	else
		window.open(shopLink);

	trackPageView("Kollektion - Ballstundeangebot");

	
}