function popupContact(url,x,y) {
	win3 = window.open(url, 'Contact','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,screenX=100,screenY=100,copyhistory=no,width='+x+',height='+y);
	win3.focus();
}

function openwin(url,w,h,s,r) {
  var scrl; var resze; 
  if (s) { scrl="scrollbars=yes,";}
  else { scrl="scrollbars=no,"; }
  if (r) { resze = " resizable=yes,"; }
  else { resze=" resizable=no,"; }
  if (!w) w = 672;
  if (!h) h = 480;
  fenster = window.open(url,"name",scrl+resze+"width="+w+",height="+h+",top=50,left=100");
    fenster.focus();
  }

if (navigator.appName=="Netscape")
{

stylesheet = "css/pro_n.css";
}
else{
stylesheet = "css/pro.css";
}

css= "<link rel='stylesheet' type='text/css' href='http://www.novartisoncology.nl/" + stylesheet +"'>";

document.write(css);

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; ia.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) { //v4.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&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); 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 getNewRequest(temp,replacer){
  request = self.location.href;
  newRequest = request.replace(temp,replacer);
  return newRequest;
}

function mailTo(){
//der erste Parameter ist eine regexp, die ersetzt werden soll mit dem zweiten String Parameter. Damit kann der Request modifiziert werden
   var mailRequest = getNewRequest('../w/index.html','W');
//Der Text, der an den mail client übergeben wird, kann modifiziert werden, muss aber url encodiert sein
window.location.href="mailto:?subject=Link-Tip&enctype='x-application/x-www-form-urlencode'&body=Dieser%20Link%20verweist%20auf%20eine%20interessante%20Internetseite%20%20"+mailRequest;
}

function printContent(f) {

        var sContent = '<html><link href="/css/package.css" rel="stylesheet" type="text/css"><body><table>'
        if (f == "single") {
                sContent += "<tr><td valign='top'>"+document.getElementById('columnB_top').innerHTML+"</td>";
                sContent += "<td valign='top'>"+document.getElementById('bufferBC_top').innerHTML+"</td>";
                sContent += "<td valign='top'><table><tr>"+document.getElementById('columnC_top').innerHTML+"</tr></table></td>";
                sContent += "<tr valign='top'><td><table width='100%'><tr>"+document.getElementById('columnB_bottom').innerHTML+"</tr></table></td>";
        } else {
                sContent += "<tr><td valign='top'>"+document.getElementById('columnB_top').innerHTML+"</td>";
                sContent += "<tr valign='top'><td><table width='100%'><tr>"+document.getElementById('columnB_bottom').innerHTML+"</tr></table></td></tr>";
        }
        sContent += '</table></body></html>';
        var printwindow=window.open("","","toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,resizable=yes,width=640,height=480,screenX=200,screenY=50");
        printwindow.document.open();
        printwindow.document.write(sContent);
        printwindow.document.close();
        printwindow.focus();
}



function setDisclaimerTarget(disclaimertarget){
	target="";
	target=disclaimertarget;
}

function openDisclaimer(urlt,w,h) {
	if (!urlt) url = "external_disclaimer.html";
	else url = urlt;
	var scrl; var resze;
	scrl="scrollbars=no,";
	resze="resizable=no,";
	if (!w) w = 400;
	if (!h) h = 300;
	fenster = window.open(url,"_blank",scrl+resze+"width="+w+",height="+h+",screenX=200,screenY=50");
	fenster.focus();
}


function openWindow(url,name,width,height){
                      window.open (url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+width+",height="+height)
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function putFocus(lmnt)
{
	document.broschueren.elements[lmnt].value="";
	document.broschueren.elements[lmnt].focus();
}

function popupContact(url,x,y) {
	win3 = window.open(url, 'Contact','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,screenX=100,screenY=100,copyhistory=no,width='+x+',height='+y);
	win3.focus();
}

function validateAddress()
{
	if (document.broschueren.elements["name"].value.length == 0)
	{
		alert("Bitte geben Sie Ihren Nachnamen an!"); 
		putFocus("name"); 
		return false;
	}
	if (document.broschueren.elements["vorname"].value.length == 0)
	{
		alert("Bitte geben Sie Ihren Vornamen an!");
		putFocus("vorname");
		return false;
	}
	if (document.broschueren.elements["strasse"].value.length == 0)
	{
		alert("Bitte geben Sie Ihre Strasse an!");
		putFocus("strasse");
		return false;
	}
	if (document.broschueren.elements["plz"].value.length == 0)
	{
		alert("Bitte geben Sie Ihre Postleitzahl an!");
		putFocus("plz");
		return false;
	}
	if (document.broschueren.elements["ort"].value.length == 0)
	{
		alert("Bitte geben Sie Ihren Wohnort an!");
		putFocus("ort");
		return false;
	}
	document.broschueren.ort.value += " " + document.broschueren.landinput.value;
        window.open('about:blank','popup','width=300,height=120');
	return true;
}
	
function checkCR(evt) {

    var evt  = (evt) ? evt : ((event) ? event : null);

    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}

  }


	
	
function validateInput()
{
	alle = document.broschueren.length;	
	if (alle >= 7)
	{
		buecher = 0;
		for (i=0; i < (alle-6); i++)
		{
			if (document.broschueren.elements[i].checked)
			{
				buecher++;
			} 
		}
		if (buecher>=1)
		{
			return validateAddress();
		}
		else 
		{ 
			alert("Bitte waehlen Sie mindestens eine Broschuere aus !");
			return false;
		}
	}
	else
	{
			alert("Bitte waehlen Sie mindestens eine Broschuere aus !");
			return false;
		return validateAddress();
	}
}
  document.onkeypress = checkCR;
