function toggle_form_element() {
	if (document.getElementsByName('payment_method_id')[4].checked) {
    	document.getElementById('wrap-vmLastschrift').style.display = 'block';
	} else {
    	document.getElementById('wrap-vmLastschrift').style.display = 'none';
	}
}


function initAll() {
	writeSocialBookmarks();
	mladdevents();
	//koeaddevents();
	//writeKategorySlide();
	//fillup();
}

function deInitAll() {
/*	saveSettings(); */
}

function writethis(what) {
	document.write(what);
}


function openChat() {
	var website = chat_website;
	var windowprops='width=' + chat_winwidth + ',height=' + chat_winheight + ',menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no'
	var heightspeed = 3;
	var widthspeed = 3;
	var leftdist = 10;
	var topdist = 10;

/*	if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
		var winwidth = chat_winwidth;
		var winheight = chat_winheight;
		var sizer = window.open(website,'Beauty-Ideal Chat',"left=" + leftdist + ",top=" + topdist +","+ windowprops);
		for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
			sizer.resizeTo("1", sizeheight);
			
		for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
			sizer.resizeTo(sizewidth, sizeheight);
		
		sizer.location = website;
		sizer.focus();
	}
	else {
		window.open(website,'Beauty-Ideal-Chat');
	}*/
	window.open(website,'Beauty-Ideal Chat',"left=" + leftdist + ",top=" + topdist +","+ windowprops);
}

function openCallback() {
	var windowprops='width=352,height=675,top=100,left=100,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes'
	window.open(mCLS + "/callback.php", "callback", windowprops );
}


function showWLinks() {
	document.getElementById('wlinks').style.display = "block";
	window.clearTimeout(WLinksTimer);
}

function hideWLinks() {
	WLinksTimer = window.setTimeout("document.getElementById('wlinks').style.display='none'",200);
	
}

function showWLinksDiv() {
	window.clearTimeout(WLinksTimer);
}

function hideWLinksDiv() {
	WLinksTimer = window.setTimeout("document.getElementById('wlinks').style.display='none'",200);
}

function showPLinks() {
	document.getElementById('plinks').style.display = "block";
	window.clearTimeout(PLinksTimer);
}

function hidePLinks() {
	PLinksTimer = window.setTimeout("document.getElementById('plinks').style.display='none'",200);
	
}

function showPLinksDiv() {
	window.clearTimeout(PLinksTimer);
}

function showCatDescription() {
	document.getElementById('hiddenCategoryText').style.display = "block";
	document.getElementById('hiddenCategoryText2').className='related_footer_category';
	window.clearTimeout(CatDescriptionTimer);
}

function hideCatDescription() {
	CatDescriptionTimer = window.setTimeout("document.getElementById('hiddenCategoryText').style.display='none';document.getElementById('hiddenCategoryText2').className='related_footer_category4';",200);
	
}

function showCatDescriptionDiv() {
	window.clearTimeout(CatDescriptionTimer);
}

function hideCatDescriptionDiv() {
	CatDescriptionTimer = window.setTimeout("document.getElementById('hiddenCategoryText').style.display='none';document.getElementById('hiddenCategoryText2').className='related_footer_category4';",200);
}








function showQuickcart(kp) {
	document.getElementById('quickcart').style.display = 'block';
}

function closeQuickcart(forceClose) {
	document.getElementById('quickcart').style.display = 'none';
}

var WLinksTimer;
var PLinksTimer;
var CatDescriptionTimer;
window.onload = initAll;
window.onunload = deInitAll;

