function skift_sprog(ny_sprog,retur,gruppe_id)
 {

$.ajax({
data: "ny_sprog="+ny_sprog,
type: "POST", 
url: "skift_sprog.php", 
cache: false,
dataType: "html",
 success: function(data){
 
if (retur=="start"){
vis_oversigt();
}
if (retur=="gruppe"){
	open_gruppe('',gruppe_id);
	$('#edit').hide(0);
$('#edit_2').hide(0);
$('#edit_3').hide(0);
$('#message').hide(0);
$('#popup').hide(0);
}
if (retur=="bestilling"){
	add_ordre();
	$('#edit').hide(0);
$('#edit_2').hide(0);
$('#edit_3').hide(0);
$('#message').hide(0);
$('#popup').hide(0);

}
	  }
}); 

}


//funktion der ændrer farve i overskrifter ved sortering.
function bgcolor(order){
	document.getElementById("1").style.backgroundColor="#7B9CAF";
	document.getElementById("2").style.backgroundColor="#7B9CAF";
	document.getElementById("3").style.backgroundColor="#7B9CAF";
	document.getElementById("4").style.backgroundColor="#7B9CAF";
	document.getElementById("5").style.backgroundColor="#7B9CAF";
	document.getElementById("6").style.backgroundColor="#7B9CAF";
	document.getElementById("7").style.backgroundColor="#7B9CAF";
	document.getElementById("8").style.backgroundColor="#7B9CAF";	
		document.getElementById(order).style.backgroundColor="#dddddd";
}

//funktion der ændrer farve i overskrifter ved sortering.
function bgcolor_1(order){
	document.getElementById("1").style.backgroundColor="#7B9CAF";
	document.getElementById("2").style.backgroundColor="#7B9CAF";
	document.getElementById("3").style.backgroundColor="#7B9CAF";
		document.getElementById("4").style.backgroundColor="#7B9CAF";
		document.getElementById(order).style.backgroundColor="#dddddd";
}

function vis_vare_logo(vare_id)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
scriptCharset: "utf-8",
url: "vis_vare_logo.php", 
cache: false,
dataType: "html",
success: function(data){
  $.prompt(data,{
	buttons: { },
	show:'slideDown',
	persistent:false, 
});
 	  }
}); 
}

function vis_betingelser()
{

$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "vis_betingelser.php", 
cache: false,
dataType: "html",
success: function(data){
  $("div#tekst_edit_2").html(data);
show_edit_2();
  
 	  }
}); 
}

function vis_vare_info(vare_id)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
scriptCharset: "utf-8",
url: "vis_vare_info.php", 
cache: false,
dataType: "html",
before: $('#edit_3').hide(0),
success: function(data){
  $("div#tekst_edit_3").html(data);
show_edit_3();
 	  }
}); 
}

function add_gruppe_logo(gruppe_id)
{
var str = "gruppe_id="+gruppe_id;
$.ajax({
data: str,
type: "POST", 
url: "add_gruppe_logo.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
 success: function(data){
show_edit();
index_edit();
  $("div#tekst_edit").html(data);
 	 }
}); 
}

function startCallback() {
			// make something useful before submit (onStart)
			show_message(tekst_1);
			return true;
		}

		function completeCallback(response) {
			// make something useful after (onComplete)
			vis_oversigt();
			hide_edit();
			show_message(response);
		}

//slet gruppe logo
function slet_gruppe_logo(gruppe_id)
{
var r=confirm(tekst_2);
if (r==true)
{
$.ajax({
data: "gruppe_id="+gruppe_id,
type: "POST", 
url: "slet_gruppe_logo.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_3),
 success: function(data){
 admin_gruppe();
 show_message(data);
 vis_oversigt();
 hide_edit_2();
 	 }
}); 
}
}

function add_vare_logo(vare_id)
{
var str = "vare_id="+vare_id;
$.ajax({
data: str,
type: "POST", 
url: "add_vare_logo.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
 success: function(data){
show_edit();
index_edit();
  $("div#tekst_edit").html(data);
 	 }
}); 
}

//upload af vare billede
function startCallback_2() {
			// make something useful before submit (onStart)
			show_message(tekst_4);
			return true;
		}

		function completeCallback_2(response) {
			// make something useful after (onComplete)
			var gruppe_id=document.form_gruppe.gruppe_id.value;
			var vare_id=document.form_vare_linie.vare_id.value;
			var retur=document.form_gruppe.retur.value;
			if (retur=="admin"){
					
			}
			else {
				update_billede_link(vare_id);
			}
			hide_edit();
			show_message(response);
		}

//slet bilag
function slet_vare_billede(vare_id)
{
var r=confirm(tekst_5);
if (r==true)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
url: "slet_vare_billede.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_6),
 success: function(data){
 show_message(data);
update_billede_link(vare_id);
 	 }
}); 
}
}

/*rediger gruppe*/
function update_billede_link(vare_id)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
scriptCharset: "utf-8",
url: "update_billede_link.php", 
cache: false,
dataType: "html",
success: function(data){
var id="span#billede_"+vare_id;
$(id).html(data);
 	  }
}); 
}


function add_vare_bilag(vare_id)
{
var str = "vare_id="+vare_id;
$.ajax({
data: str,
type: "POST", 
url: "add_vare_bilag.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
 success: function(data){
show_edit();
index_edit();
  $("div#tekst_edit").html(data);
 	 }
}); 
}

//upload af bilag
function startCallback_3() {
			// make something useful before submit (onStart)
			show_message(tekst_7);
			return true;
		}

		function completeCallback_3(response) {
			// make something useful after (onComplete)
			var gruppe_id=document.form_gruppe.gruppe_id.value;
			var vare_id=document.form_vare_linie.vare_id.value;
			var retur=document.form_gruppe.retur.value;
			if (retur=="admin"){
			
			}
			else {
			update_bilag_link(vare_id);
			}
			hide_edit();
			show_message(response);
		}

//slet bilag
function slet_vare_bilag(vare_id)
{
var r=confirm(tekst_8);
if (r==true)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
url: "slet_vare_bilag.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_9),
 success: function(data){
 show_message(data);
update_bilag_link(vare_id);
 	 }
}); 
}
}

/*rediger gruppe*/
function update_kurv_link_antal()
{
$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "update_kurv_link_antal.php", 
cache: false,
dataType: "html",
success: function(data){
$("span#kurv_antal").html(data);
 	  }
}); 
}

/*rediger gruppe*/
function update_bilag_link(vare_id)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
scriptCharset: "utf-8",
url: "update_bilag_link.php", 
cache: false,
dataType: "html",
success: function(data){
var id="span#bilag_"+vare_id;
$(id).html(data);
 	  }
}); 
}



/*åbner gruppe oversigten*/
function open_search()
{
$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "open_search.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit();
  $("div#tekst_edit").html(data);
index_edit();
 	  }
}); 
}


//gem gruppe
function vis_search_vare()
{
if (isEmpty(document.form_search.search_vare, tekst_10)){ return false};
 $.ajax({
data: $("form").serialize(),
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "vis_search_vare.php",
before: show_message(tekst_11),
 success: function(data){
  hide_message();
  hide_edit()
 $("div#my_main").html(data);
}
}); 
}

/*åbner gruppe oversigten*/
function admin_gruppe()
{
$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "admin_gruppe.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit();
  $("div#tekst_edit").html(data);
index_edit();
 	  }
}); 
}


function skift_gruppe_status(gruppe_id)
{
var status=document.getElementById("online_"+gruppe_id).checked;
$.ajax({
data: "status="+status+"&gruppe_id="+gruppe_id,
type: "POST", 
url: "skift_gruppe_status.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);
	vis_oversigt();
      	   }
}); 
}



/*tilføj gruppe formularen*/
function add_gruppe()
{
$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "add_gruppe.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
 	  }
}); 
}

//opret gruppe
function opret_gruppe()
{
if (isEmpty(document.form_edit_gruppe.dk_gruppe_navn, tekst_12)){ return false};

$.ajax({
data: $("form").serialize(),
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "opret_gruppe.php",
before: show_message(tekst_99),
 success: function(data){
	show_message(data);
admin_gruppe();
hide_edit_2();
vis_oversigt();
 }
});
} 

/*rediger gruppe*/
function edit_gruppe(gruppe_id,retur)
{
$.ajax({
data: "gruppe_id="+gruppe_id+"&retur="+retur,
type: "POST", 
scriptCharset: "utf-8",
url: "edit_gruppe.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
 	  }
}); 
}

//gem gruppe
function gem_gruppe(gruppe_id,retur)
{
if (isEmpty(document.form_edit_gruppe.dk_gruppe_navn, tekst_12)){ return false};
 
$.ajax({
data: $("form").serialize()+"&gruppe_id="+gruppe_id,
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "gem_gruppe.php",
before: show_message(tekst_99),
 success: function(data){
	hide_edit_2();
	show_message(data);
	if (retur=="oversigt"){
	vis_oversigt();
	}
	if (retur=="admin"){
  	admin_gruppe();
  	vis_oversigt();
	  }
	if (retur=="gruppe"){
		open_gruppe('',gruppe_id)
	}  
  }

});
} 

//slet gruppe
function slet_gruppe(gruppe_id)
{
var r=confirm(tekst_13);
if (r==true)
{
$.ajax({
data: "gruppe_id="+gruppe_id,
type: "POST", 
url: "slet_gruppe.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message("Gruppe slettes"),
 success: function(data){
 admin_gruppe();
 show_message(data);
 vis_oversigt();
 	 }
}); 
}
}


/*rediger system settings*/
function edit_settings()
{
$.ajax({
type: "POST", 
scriptCharset: "utf-8",
url: "edit_settings.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit();
     $("div#tekst_edit").html(data);
index_edit();
 	  }
}); 
}

/*gem system settings*/
function gem_settings()
{
if (isEmpty(document.form_edit_settings.firma_navn, tekst_14)){ return false};

if (isEmpty(document.form_edit_settings.kontakt_mail, tekst_15)){ return false};
if (emailValidator(document.form_edit_settings.kontakt_mail, tekst_16)){return false};

var mobil=document.form_edit_settings.kontakt_mobil.value;
if (mobil != "") {
if (lengthSkal(document.form_edit_settings.kontakt_mobil, '8', tekst_17)){return false;}
if (isNumeric(document.form_edit_settings.kontakt_mobil, tekst_18)){ return false;};	
}

$.ajax({
data: $("form").serialize(),
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "gem_settings.php",
before: show_message(tekst_99), 
 success: function(data){
	show_message(data);
	hide_edit();
	vis_oversigt();
	  }
});
} 


function open_gruppe(row_start,gruppe_id)
{

$.ajax({
data: "row_start="+row_start+"&gruppe_id="+gruppe_id,
type: "POST", 
url: "open_gruppe.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
 success: function(data){
 $("div#my_main").html(data);
  vis_menu_adm('gruppe',gruppe_id);
   vis_menu_bruger('gruppe',gruppe_id);
 	 }
}); 
}



/*åbner gruppe oversigten*/
function admin_vare(row_start,filter)
{
$.ajax({
data: "row_start="+row_start+"&filter="+filter,
type: "POST", 
scriptCharset: "utf-8",
url: "admin_vare.php", 
cache: false,
dataType: "html",
success: function(data){
  $("div#my_main").html(data);
 	  }
}); 
}

function add_vare(gruppe_id)
{
$.ajax({
data: "gruppe_id="+gruppe_id,
type: "POST", 
url: "add_vare.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
 success: function(data){
 show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
 	 }
}); 
}


//gem gruppe
function opret_vare(gruppe_id)
{
if (isEmpty(document.form_vare.dk_vare_navn, tekst_19)){ return false};

var url=document.form_vare.ekstern_url.value;
if (url != "") {
if (wwwValidator(document.form_vare.ekstern_url, tekst_20)){return false};
}

$.ajax({
data: $("form").serialize()+"&gruppe_id="+gruppe_id,
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "opret_vare.php",
before: show_message(tekst_99),
 success: function(data){
	hide_edit_2();
	show_message(data);
  	open_gruppe('',gruppe_id);

  }
});
} 

/*rediger vare*/
function edit_vare(vare_id,retur)
{
$.ajax({
data: "vare_id="+vare_id+"&retur="+retur,
type: "POST", 
scriptCharset: "utf-8",
url: "edit_vare.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
 	  }
}); 
}

//gem vare
function gem_vare(vare_id,gruppe_id,retur)
{
if (isEmpty(document.form_vare.dk_vare_navn, tekst_19)){ return false};

var url=document.form_vare.ekstern_url.value;
if (url != "") {
if (wwwValidator(document.form_vare.ekstern_url, tekst_20)){return false};
}

$.ajax({
data: $("form").serialize()+"&vare_id="+vare_id,
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "gem_vare.php",
before: show_message(tekst_99),
 success: function(data){
	hide_edit_2();
	show_message(data);

	if (retur=="admin"){
  	admin_vare('',gruppe_id);
  	}
else {
	open_gruppe('',gruppe_id);
}
  }
});
} 

//slet gruppe
function slet_vare(vare_id,gruppe_id)
{
var r=confirm(tekst_21);
if (r==true)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
url: "slet_vare.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_22),
 success: function(data){
 show_message(data);
open_gruppe('',gruppe_id);
 hide_edit_2();
 	 }
}); 
}
}


function open_vare(vare_id,gruppe_id)
{
$.ajax({
data: "vare_id="+vare_id,
type: "POST", 
url: "open_vare.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_99),
 success: function(data){
 $("div#my_main").html(data);
  vis_menu_adm('vare',vare_id);
   vis_menu_bruger('vare',gruppe_id);
   hide_message();
 	 }
}); 
}



function open_ordre(row_start,filter)
{
$.ajax({
data: "row_start="+row_start+"&filter="+filter,
type: "POST", 
url: "open_ordre.php", 
cache: false,
dataType: "html",
 success: function(data){
     $("div#my_main").html(data);
      	   }
}); 
}

function admin_ewire(ordre_id)
{
$.ajax({
data: "ordre_id="+ordre_id,
type: "POST", 
url: "admin_ewire.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_edit_2();
  $("div#tekst_edit_2").html(data);

      	   }
}); 
}

function open_profil(row_start,filter)
{
$.ajax({
data: "row_start="+row_start+"&filter="+filter,
type: "POST", 
url: "open_profil.php", 
cache: false,
dataType: "html",
 success: function(data){
     $("div#my_main").html(data);
      	   }
}); 
}


function skift_ordre_status(ordre_id,status)
{
$.ajax({
data: "status="+status+"&ordre_id="+ordre_id,
type: "POST", 
url: "skift_ordre_status.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);

      	   }
}); 
}

function skift_betalt_status(ordre_id,status)
{
$.ajax({
data: "status="+status+"&ordre_id="+ordre_id,
type: "POST", 
url: "skift_betalt_status.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);

      	   }
}); 
}

function skift_vare_status(vare_id)
{
var status=document.getElementById("online_"+vare_id).checked;
$.ajax({
data: "status="+status+"&vare_id="+vare_id,
type: "POST", 
url: "skift_vare_status.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);

      	   }
}); 
}

function skift_lager_status(vare_id)
{
var status=document.getElementById("lager_status_"+vare_id).checked;
$.ajax({
data: "status="+status+"&vare_id="+vare_id,
type: "POST", 
url: "skift_lager_status.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);

      	   }
}); 
}

function vis_ordre(ordre_id)
{
$.ajax({
data: "ordre_id="+ordre_id,
type: "POST", 
url: "vis_ordre.php", 
cache: false,
dataType: "html",
 success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
      	   }
}); 
}

function edit_ordre(ordre_id)
{
$.ajax({
data: "ordre_id="+ordre_id,
type: "POST", 
url: "edit_ordre.php", 
cache: false,
dataType: "html",
 success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
      	   }
}); }


/*gem system settings*/
function gem_ordre(ordre_id)
{
$.ajax({
data: $("form").serialize()+"&ordre_id="+ordre_id,
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "gem_ordre.php",
before: show_message(tekst_99), 
 success: function(data){
	show_message(data);
	hide_edit_2();
open_ordre();
	  }
});
} 

//slet gruppe
function slet_ordre(ordre_id)
{
var r=confirm(tekst_23);
if (r==true)
{
$.ajax({
data: "ordre_id="+ordre_id,
type: "POST", 
url: "slet_ordre.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_24),
 success: function(data){
 show_message(data);
 	open_ordre();
 	 }
}); 
}
}


function add_til_kurv_antal(vare_id)
{
$.ajax({
 data: "vare_id="+vare_id,
type: "POST", 
url: "add_til_kurv_antal.php", 
cache: false,
dataType: "html",
 success: function(data){
show_edit_3();
$("div#tekst_edit_3").html(data);

   	   }
}); 
}


function add_til_kurv(vare_id)
{
 
var x=document.form_kurv_antal.vare_antal.value;
if (isNumeric_2(x, tekst_25)){ return false;};	
if (x<1){alert(tekst_26); return false;};

$.ajax({
 data: "vare_id="+vare_id+"&vare_antal="+x,
type: "POST", 
url: "add_til_kurv.php", 
cache: false,
dataType: "html",
 success: function(data){
show_message(data);   
hide_edit_3();
 update_kurv_link_antal();
   	   }
}); 
}

function open_kurv()
{

$.ajax({
type: "POST", 
url: "open_kurv.php", 
cache: false,
dataType: "html",
 success: function(data){
show_edit_2();
  $("div#tekst_edit_2").html(data);
index_edit_2();
    	   }
}); 
}

//bruge pt. ikke, kan evt. kaldes fra open_kurv
function skift_vare_antal(kurv_id,retur)
{
id="vare_antal_"+kurv_id;
var antal=document.getElementById(id).value;
if (isNumeric_2(antal, tekst_25)){ return false;};	
if (antal<1){alert(tekst_26); return false;};
$.ajax({
data: "antal="+antal+"&kurv_id="+kurv_id,
type: "POST", 
url: "skift_vare_antal.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_message(data);
 if (retur=="kurv"){
	open_kurv();
}
   }
}); 
}

/*rediger vare*/
function edit_vare_linie(kurv_id,retur)
{
$.ajax({
data: "kurv_id="+kurv_id+"&retur="+retur,
type: "POST", 
scriptCharset: "utf-8",
url: "edit_vare_linie.php", 
cache: false,
dataType: "html",
success: function(data){
show_edit_3();

  $("div#tekst_edit_3").html(data);

	  }
}); 
}

//gem vare
function gem_vare_linie(kurv_id,retur)
{
var x=document.getElementById("vare_antal").value;
if (isNumeric_2(x, tekst_25)){ return false;};	
if (x<1){alert(tekst_26); return false;};

$.ajax({
data: $("form").serialize()+"&kurv_id="+kurv_id,
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "gem_vare_linie.php",
before: show_message("Data gemmes"),
 success: function(data){
	hide_edit_3();
	show_message(data);
	if (retur=="kurv"){
	open_kurv();
}
else if (retur=="ordre"){
	add_ordre();
}
  }
});
} 



function slet_vare_linie(kurv_id,retur)
{
var r=confirm(tekst_27);
if (r==true)
{
$.ajax({
data: "kurv_id="+kurv_id,
type: "POST", 
url: "slet_vare_linie.php", 
cache: false,
dataType: "html",
scriptCharset: "UTF-8",
before: show_message(tekst_28),
 success: function(data){
 show_message(data);
if (retur=="kurv"){
	open_kurv();
}
else if (retur=="ordre"){
	add_ordre();
}
 update_kurv_link_antal();
}
}); 
}
}

function add_ordre()
{

$.ajax({
type: "POST", 
url: "add_ordre.php", 
cache: false,
dataType: "html",
 success: function(data){
     $("div#my_main").html(data);
     hide_popup();
    hide_edit_2();
    vis_menu_bruger('bestilling');
	  	   }
}); 
}

function opret_ordre(){

if (isEmpty(document.kontakt_form.ordre_navn, tekst_29)){ return false};
if (isEmpty(document.kontakt_form.ordre_adresse, tekst_30)){ return false};
if (lengthSkal(document.kontakt_form.ordre_post_nr, '4', tekst_31)){return false;}
if (isNumeric(document.kontakt_form.ordre_post_nr, tekst_32)){ return false;};	
if (isEmpty(document.kontakt_form.ordre_town, tekst_33)){ return false};
if (isEmpty(document.kontakt_form.ordre_email, tekst_15)){ return false};
if (emailValidator(document.kontakt_form.ordre_email, tekst_16)){return false};

var mobil=document.kontakt_form.ordre_mobil.value;
if (mobil != "") {
if (lengthSkal(document.kontakt_form.ordre_mobil, '8', tekst_17)){return false;}
if (isNumeric(document.kontakt_form.ordre_mobil, tekst_18)){ return false;};	
}

if (!document.getElementById('pay_valg_ewire').checked && !document.getElementById('pay_valg_bank' ).checked && !document.getElementById('pay_valg_paypal' ).checked){alert(tekst_34); return false};

if (document.kontakt_form.betingelser_check.value=="on"){
if (!document.kontakt_form.accept_betingelser.checked){alert(tekst_35); return false};
}

$.ajax({
data: $("form").serialize(),
type: "POST", 
scriptCharset: "utf-8",
cache: false,
dataType: "html",
url: "opret_ordre.php",
before: show_message(tekst_36), 
success: function(data){
hide_message();
$("div#my_main").html(data);

 }
});

}

function start_betal_ewire(ordre_id)
{
$.ajax({
 data: "ordre_id="+ordre_id,
type: "POST", 
url: "start_betal_ewire.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_edit();
  $("div#tekst_edit").html(data);
	  	   }
}); 
}

function start_betal_paypal(ordre_id)
{
$.ajax({
 data: "ordre_id="+ordre_id,
type: "POST", 
url: "start_betal_paypal.php", 
cache: false,
dataType: "html",
 success: function(data){
     show_edit();
  $("div#tekst_edit").html(data);
	  	   }
}); 
}


