function openShadowbox(url,width,height){
	$.fn.colorbox({href:url, width:width, open:true, height:height}); 
}

function openShadowboxIframe(url,width,height,title){
	$.fn.colorbox({href:url, width:width, open:true, height:height, iframe:true,title:title}); 
}

function openShadowboxText(text,width,height){
	$.fn.colorbox({html:text, width:width, height:height}); 
}


function openShadowboxInline(divid,width,height){
	$.fn.colorbox({href:'#'+divid, inline:true, width:width, height:height}); 
}

function savePinPost(formname,masktype,divid){
	$.post("/inc/apps/inc/"+masktype+".cfm", $("#" + formname).serialize(), function(data){

			if(data!=''){
				$('#'+divid).html(data);
				


				//$('#'+divid).removeClass('toggle');
			}
			else{
				//$('#'+divid).addClass('toggle');
				//$('#'+divid).html(masktype+': [NO CONTENT]');
			}
		
	});
	//$.fn.colorbox.resize();
}

function checkRecalc(){
	x = 0;
	$('input.amt').each(
		function(index){
			if(isNaN(this.value)){
				x=1;
			}
		}
	);
	if(x==0){
		document.forms['cart'].submit();
	}
	else{
		return alert('Bitte korrekte Anzahl angeben!');
		document.forms['cart'].action.value = '';
		document.forms['cart'].action = '';
		void(0);
	}
}

function toggle(divid){
	var options = {};
	$( "#"+divid ).toggle( 'blind', options, 500 );	
}
