$(function() {
	var corr_height = !jQuery.support.boxModel ? 24 : 0 ;
	var check_height = 78 + corr_height ;
	var set_height = 62 + corr_height ;
	var cattext_height = $('#cattext').height() + corr_height ;
	if (cattext_height > check_height) {
		$('#cattext').css('height', set_height+'px') ;
		$('#cattext').after('<div id="cattext_more"><a class="link_infotext" href="#"><b>mehr lesen &raquo;</b></a></div>') ;
		$('#cattext').append('<div id="cattext_less"><a class="link_infotext" href="#"><b>schließen</b></a></div>') ;
		$('#cattext_less').hide() ;
		$('#cattext_more a').click(function() {
			$(this).parent().hide() ;
			$('#cattext').css('height', cattext_height+'px') ;
			$('#cattext_less').show() ;
			return false ;
		}) ;
		$('#cattext_less a').click(function() {
			$(this).parent().hide() ;
			$('#cattext').css('height', set_height+'px') ;
			$('#cattext_more').show() ;
			return false ;
		}) ;
	}
}) ;

function wopen(link,wi,he) {

	var width=wi; var height=he;
	var l=(screen.availWidth-width)/2;
	var t=(screen.availHeight-height)/2;
    wincom=window.open(link ,"oswin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width="+wi+",height="+he+",screenX="+l+",screenY="+t+",left="+l+",top="+t);

    if (wincom) {
    	wincom.focus() ;
	} else {
		alert(statustext) ;
	}
}


function dellink(link,btext) {

	Check = confirm(btext);

	if(Check == false) {
		return ;
	} else {
		window.open(link,'_self') ;
	}
}


function changebutton(s) {

    window.Bestellung.obutton.value = "Bitte warten ... und diesen Button nur 1x klicken !!!!";

    if (SEND==1) {

    	alert("Sie haben die Bestellung bereits abgeschickt, bitte warten Sie auf Antwort des Shop-Servers !") ;
    	return false ;

    } else {

    	SEND=1 ;
    	return true ;
    }
}


function fielddel(f) {

	if (f.value == f.defaultValue) {

		f.value = "" ;
	}
}


function fieldset(f) {

	if (f.value == "") {

		f.value = f.defaultValue ;
	}
}


function fieldemp(f) {

	if (f.sbeg.value == f.sbeg.defaultValue) {

		f.sbeg.value = "" ;
	}
}


function tabbgcolor(hrefid,col2){

	hrefid.className='navi_top_active';
}
