﻿

function window_open_with_size2(page_name,width,height) {
	
	new_win = window.open(page_name, "openWin2", "width=" + width + ",height=" + height + ", resizable=yes, scrollbars=yes")
	new_win.focus();	
}

function window_open_with_size(page_name, width, height) {

    new_win = window.open(page_name, "openWin", "width=" + width + ",height=" + height + ", resizable=yes, scrollbars=yes")
    new_win.focus();
}

function window_open_with_size_letter(page_name,width,height) {

	if (confirm("Newsletter verschicken?")){
		new_win = window.open(page_name, "openWin", "width=" + width + ",height=" + height + ", resizable=yes, scrollbars=yes")
		new_win.focus();				
	}

}

function window_open(page_name) {

	new_win = window.open(pic_name, "picture", "width=300,height=500")

}

function this_window_close() {	 

	window.close();
}


function confirm_delete(url_string,ds_text){

	if (confirm("Soll der Datensatz " + ds_text + " geloescht werden? ")){
		
		
		
		theForm.method = "get";
		theForm.action = url_string;		
		theForm.submit();	

	}

}

function confirm_bestellung(){
	return (confirm("Soll der Warenkorb gelöscht und eine neue Bestellung ausgefuehrt werden ?"))		
}

function confirm_submit(url_string,ds_text){

	if (confirm("Soll die Aktion " + ds_text + " ausgefuehrt werden ? ")){
		document.Form1.method = "post";
		document.Form1.action = url_string;		
		document.Form1.submit();	
		
	}

}





function form_submit(url_string){

	theForm.method = "post";
	theForm.action = url_string;		
	theForm.submit();

}

function popupKalWithVar(element) {
   
    var ret
    var QuerString
    QuerString = "pop_calender.aspx?element=" +  element;
    //alert(QuerString);
    
    //if (window.showModalDialog) {
    //    ret = window.showModalDialog(QuerString, window, "dialogHeight:150px;dialogWidth:150px; status:No;");    
    //} else {
    
    
    op = window.open(QuerString, "openWin", "width=150,height=150, resizable=no, scrollbars=no,modal=yes")
       if (ret != undefined) {
          document.getElementById(element).value = ret;
    }
    
    
    
    
    
    //}
}