var open_pKey;

function popUp(file,width,height) {

	height = parseInt(height);
	width = parseInt(width);
	popup = window.open('/popup.php?f='+file,'popup','width='+width+',height='+height);
}

function setStatus(str) {
	window.status = str;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function checkReset(){
	var e = document.getElementById('searchinput');
	if(e.value == " Suche "){
		e.value = "";
	}
} 

function hoverMenu(e, bool){
	if(bool)
		e.style.backgroundImage = 'url(/images/new/menu_bg_hover.jpg)';
	else
		e.style.backgroundImage = 'url(/images/new/menu_bg.jpg)';
}

function showSearchHelp(bool){
	e = document.getElementById('newSearchHelp');
	if(bool)
		e.style.display = 'block';
	else
		e.style.display = 'none';
}


function showShadow(id){
	document.getElementById('ContentTopTeaserTitle' + id).style.backgroundImage = 'url(/images/teaserBG.png)';
}

function hideShadow(id){
	document.getElementById('ContentTopTeaserTitle' + id).style.backgroundImage = 'url(/images/teaserBG_hover.png)';
}

function changeVariant(picurl, pKey){
	if(open_pKey)
		jQuery('#ArticleColorPickerItem_' + open_pKey).css('font-weight', 'normal');
		
	jQuery('#ArticleColorPickerItem_' + pKey).css('font-weight', 'bold');

	if(open_pKey)
		jQuery('#Variants_' + open_pKey).slideUp('normal', function(){
			jQuery('#Variants_' + pKey).slideDown('normal');
		});
	else
		jQuery('#Variants_' + pKey).slideDown('normal');
			
	if(open_pKey)
		jQuery('#Variants_Pic_' + open_pKey).fadeOut('normal', function(){
			jQuery('#Variants_Pic_' + pKey).fadeIn('normal');
		});
	else
		jQuery('#ArticlePic').fadeOut('normal', function(){
			jQuery('#Variants_Pic_' + pKey).fadeIn('normal');
		});
	
	open_pKey = pKey;
}
