﻿	

 /* --------------------------------------------------------------------
	Submit via JS 
-------------------------------------------------------------------- */
function xsubmit(form,url) {
	
	form.action = url;
	form.submit();
}

/* --------------------------------------------------------------------
	ID ein und ausblenden
-------------------------------------------------------------------- */
function changeVisibility(id) {

  var el = document.getElementById(id);

  if (el) {
	if (el.style.display == "none")
	  el.style.display = "block";
	else
	  el.style.display = "none";
  }
}


/* --------------------------------------------------------------------
	Neue Seite nach select aufrufen
-------------------------------------------------------------------- */
function select_jump(jumpto){
	document.location.href=jumpto.value;
 }
 
 
/* --------------------------------------------------------------------
	Seite per JS wechseln
-------------------------------------------------------------------- */
function goto(url){
	document.location.href=url;
 }
 
 
/* --------------------------------------------------------------------
	Neues Fenster...anstatt target "_blank" 
-------------------------------------------------------------------- */
function targetBlank (url) {
	alert('targetBlank');
 // blankWin = window.open(url,'_blank','menubar=0,toolbar=0,location=0,directories=0,fullscreen=0,titlebar=0,hotkeys=0,status=0,scrollbars=0,resizable=0');
}


/* --------------------------------------------------------------------
	Bild tauschen - changeImg('eg1','eg_thumbs[1]') oder bildobj;
-------------------------------------------------------------------- */
function changeImg(bildname,bildobj)
{
	document.images[bildname].src = eval(bildobj + ".src");
}

/* --------------------------------------------------------------------
	Bild in einem neuen Fenster öffnen
-------------------------------------------------------------------- */
function OpenNewImage(bigurl, width, height)
{
    var newWindow = window.open("", "_blank", "width=" + width + ",height=" + height + ",menubar=no,scrollbars=no,location=no,status=no,titlebar=no,resizable=no");
    newWindow.document.writeln("<html>");
	newWindow.document.writeln("<base href='http://www.karlditandy.de/' />");
	newWindow.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>");
	newWindow.document.writeln("<style  type='text/css'>* {margin: 0; padding: 0; border: none; text-decoration:none;} </style>");
    newWindow.document.writeln("<body>");
    //newWindow.document.writeln("<a href='javascript:window.close();'");
    newWindow.document.writeln("<img src='" + bigurl + "' alt='karlditandy.de' id='bigImage'/>");
    //newWindow.document.writeln("</a>");
    newWindow.document.writeln("</body></html>");
    newWindow.document.close();
	newWindow.focus();
}
