var whitespace = " \t\n\r";

var message="Franke Holding AG\n\n";
message= message + "If you want to use our original logo press \"OK\" \notherwise please choose \"Cancel\".\n";
function click(e) {
                if (document.all) {
                if (event.button == 2) {
                        if (confirm(message)) {
                                parent.location.href="/logo.gif"
                        }
                        return false;
                }
        }

        if (document.layers) {
                if (e.which == 3) {
                        if (confirm(message)) {
                                parent.location.href="/logo.gif"
                        }
                        return false;
                }
        }else{
		
		}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);}else{
}
//document.onmousedown=click;


function contactWebmaster(){

        msg = "This e-mail address is meant for webtechnical issues only.\n";
        msg = msg + "To get information about Franke and its products please use ";
        msg = msg + "the Contact \n button located in the red bar at the top of each page.\n\n";
        msg = msg + "Do you still want to send an e-mail to the webmaster?"

        if (confirm(msg))
                parent.location.href="/contact/index.php?EMAILADDRESS=webmaster@franke.com"

}

function oldbrowser()
{
	if(document.getElementById){
	}
	else{
	document.location.href="";
	}
}




function Changegrfx(id,scr)
{
	if(document.getElementById){
	document.getElementById(id).src = scr;
	}else{
	}

}





/* Function to Show and Hide DIV's */
function ShowHideDiv(id,style)
{
	if(document.getElementById){
	document.getElementById(id).style.visibility = style;
	}
}

/* Function to set Focus to the Popup */
function Fokusierung()
{
self.focus();
}


/* Function to get LM Date */
function modDate(doc){

        var dateStr = doc.lastModified;
        var parseDate = Date.parse(dateStr);

        if (parseDate != 0){
                return dateStr;
        }
        else{
                return "Dynamic Content";
        }

}




/* Function to create user specified PopUp */
function PopUpWindow(url,windowname,breite,hoehe,scroll,rez,tool,menu,loc,horz,vert)
{
// PopUpWindowGenerator

// url= zu öffnende url
// windowname = name des fensters
// breite = Breite des Fensters
// hoehe = Hoehe des Fensters
// scroll = Scrollbar (yes or no)
// rez = rezisable (yes or no)
// tool = Toolbar (yes or no)
// menu = Menubar (yes or no)
// horz = horizontale Ausrichtung (center or left or right)
// vert = vertikale Ausrichtung (top or middle or bottom)




// Berechnen von wint
if(vert=='top')
{
wint = 0;
}

if(vert=='middle')
{
wint = (screen.height - hoehe) / 2;
}

if(vert=='bottom')
{
wint = (screen.height - hoehe);
}
// Ende Berechnen von wint

		// Funktionsaufruf mit horz
		if(horz=='center')
		{
		winl = (screen.width - breite) / 2;
		popupwindow = 
		window.open(url,windowname, 'width='+breite+',height='+hoehe+',screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+',scrollbars='+scroll+',resizable='+rez+',toolbar='+tool+',menubar='+menu+',location='+loc);
		popupwindow.focus();
		}
		else
		{
			if(horz=='left')
			{
			var winl = 0;
			popupwindow = 
			window.open(url,windowname, 'width='+breite+',height='+hoehe+',screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+',scrollbars='+scroll+',resizable='+rez+',toolbar='+tool+',menubar='+menu+',location='+loc);
			popupwindow.focus();
			
			}
			
			if(horz=='right')
			{
			winl = (screen.width - breite);
			popupwindow = 
			window.open(url,windowname, 'width='+breite+',height='+hoehe+',screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+',scrollbars='+scroll+',resizable='+rez+',toolbar='+tool+',menubar='+menu+',location='+loc);
			popupwindow.focus();
			
			}
		
		
		}
		// Ende Funktionsaufruf mit horz

// Funnktion schliessen
}


/* get value out of the clipboard  */
function clpSet(txt)
{
sel = document.selection.createRange();
window.clipboardData.setData("Text",txt);
}

/* Confirmation Box */
function confirm_delete(x,y,url){

	
	
	input_box=confirm("Are you sure you d'like to delete record  "+x+" ?");
		if (input_box==true)

		{ 
		// redirect when OK
		window.location = url; 
		}

		else
		{

		}

}


function confirmation_box(message,trueurl)
{

	
	input_box = confirm(""+message+"")
	if(input_box==true)
	{
	window.location = trueurl; 
	}
	else
	{
	
	}



}













function isWhitespace(s){

        var i;

    if (isEmpty(s)) return true;

    for (i = 0; i < s.length; i++){
        var c = s.charAt(i);
        if (whitespace.indexOf(c) == -1) return false;
    }

    return true;
}


function isEmpty(s){
   return ((s == null) || (s.length == 0))
}






function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_validateForm() { //v3.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (val!=''+num) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



/* Doubleclick Search Egine Functions */

var NS = (navigator.appName == "Netscape") ? 1 : 0;
if (NS) { 
if(navigator.appVersion.substr(0,1) <= "4") { document.captureEvents(Event.DBLCLICK); //Netscape4
} else { document.addEventListener("dblclick",auslesen,true); } //Mozilla/NS6/7 
} 
document.ondblclick = auslesen;


var fenster;
function auslesen() {
if (NS) {
textvar = document.getSelection();
oeffnefenster(textvar);
}
else {
textvar = document.selection.createRange();
if(document.selection.type == 'Text' && textvar.text != '') {
document.selection.empty();
oeffnefenster(textvar.text);
}
}
}
function oeffnefenster(suche) {
if (suche > '') {
fenster = window.open('/search/web/?search_mode=UDM_MODE_ANY&language=en&records_page=10&q='+suche, 'suchmaschine', 'width=800, height=600, resizable=yes, menubar=yes, toolbar=yes, scrollbars=yes');
setTimeout('fenster.focus()', 50);
}
}


