
// --------------------------------------------------
// Allgemeine Shop-Funktionen
// --------------------------------------------------


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() ;
    }
}

function wopen2(link,wi,he) {
	
	var width = wi ;
	var height = he ;
	var l = (screen.availWidth-width)/2 ;
	var t = (screen.availHeight-height)/2 ;
    
    wincom2 = window.open(link ,"oswin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+wi+",height="+he+",screenX="+l+",screenY="+t+",left="+l+",top="+t);
    
    if ( wincom2 ) {
    
    	wincom2.focus() ;
    }
}

function tabbgcolor(tabid,col) {
	
	tabid.style.backgroundColor = col;
}

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 = "" ;
	}
}



// --------------------------------------------------
// Autostart
// --------------------------------------------------

$(document).ready(function() {

	//DIV-Popup
	var api = $("#popupdivtarget").overlay({
		
				api: true ,
				speed: 'fast' ,
				oneInstance: false, 
				finish : { top: 'center' , left: 'center' } ,
				expose : { color: '#c1c1c1' , opacity: 0.8 , loadSpeed: 0 , closeSpeed: 0 }
	}) ;
	
	window.StatusOverlay = function(iframeurl) { 
	
		if ( $("#popupdivtarget").length ) {

			if ( $("#popupdiviframe").length ) {
	
				$("#popupdiviframe").attr("src",iframeurl) ;
			}
	
			api.load(); 			
			
			return false ;
		}
	} 
	
}) ;



// --------------------------------------------------
// END
// --------------------------------------------------
