function opencontact(w,h,s,r) {
        var scrl; var resze;
        var URL = "http://www.locations.novartis.com/GDDBServlet?country_code=gb";
	if (s) { scrl="scrollbars=yes,"; w = w+16; }
	else { scrl="scrollbars=no,"; }
	if (r) { resze = "resizable=yes,"; }
	else { resze="resizable=no,"; }
	if (!w) w = 640;
	if (!h) h = 480;
	fenster = window.open(URL,"_blank",scrl+resze+"width="+w+",height="+h+",screenX=200,screenY=50");
	fenster.focus();
}

// ****** Vision Of Science Teaser UK ***** //
var VoSTimeOut;
var VoSArray = [
	{imageSRC: "/images/vos/flamingo.jpg", imageALT:"Flamingo tongue shell by Jim Greenfield", imageWidth:"162", text:"<p>Flamingo tongue shell by Jim Greenfield. &nbsp;</p>",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/drug_delivery_polymer.jpg", imageALT:"Drug Delivery Ploymer by David McCarthy", imageWidth:"162", text:"<p>Drug delivery ploymer by David McCarthy.</p>", linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/vortex.jpg", imageALT:"Vortex by Robert Anderson", imageWidth:"78", text:"<p>Vortex by Robert Anderson. &nbsp;</p>",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/growth_cones.jpg", imageALT:"Growth Cones by Dr. David Becker", imageWidth:"120", text:"<p>Growth cones by Dr. David Becker. &nbsp;</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/hanging.jpg", imageALT:"Brain aneurysm by Dr. Peter Keston", imageWidth:"120", text:"<p>Brain aneurysm by Dr. Peter Keston. &nbsp;</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/magnetic_changes.jpg", imageALT:"Magnetic field changes by Dr. Rafal Dunin-Borkowski", imageWidth:"162", text:"<p>Magnetic field changes by Dr.R.Dunin-Borkowski.</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/magnetic_field.jpg", imageALT:"Magnetic field by Dr. Rafal Dunin-Borkowski", imageWidth:"162", text:"<p>Magnetic field by Dr. Rafal Dunin-Borkowski.</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/nanowire.jpg", imageALT:"Nanowire flowers by Ghim Wei Ho", imageWidth:"162", text:"<p>Nanowire flowers by Ghim Wei Ho. &nbsp;</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}, 
	{imageSRC: "/images/vos/xray_orchids.jpg", imageALT:"X-ray orchids by Artemi Kyriacou", imageWidth:"162", text:"<p>X-ray orchids by Artemi Kyriacou. &nbsp;</p>", linkText:"",  linkText:"", linkURL:"", linkTarget:""}
];

function showVision (sequence) {
	VoSImageObject.src 	= VoSImageArray[sequence].src;
	VoSImageObject.alt 	= VoSImageArray[sequence].alt;
	//VoSImageObject.width 	= VoSImageArray[sequence].width;
	VoSTextObject.innerHTML	= VoSArray[sequence].text;
	//VosLinkObject.innerText = VoSArray[sequence].linkText;
	//VosLinkObject.href = VoSArray[sequence].linkURL;
	//VosLinkObject.target = VoSArray[sequence].linkTarget;
}

function cycleVision() {
	window.clearTimeout(VoSTimeOut);
	if (visionDisp == visionCount) {
		visionDisp = 0;
	}
	showVision(visionDisp);
	visionDisp++;
	VoSTimeOut = window.setTimeout("cycleVision()", visionDelay * 1000);
}

function preloader() 
{
	VoSImageArray = new Array();
	// start preloading
	for(i=0; i<VoSArray.length; i++) {
     		VoSImageArray[i] = new Image();
     		VoSImageArray[i].src   = VoSArray[i].imageSRC;
     		VoSImageArray[i].alt   = VoSArray[i].imageALT;
     		//VoSImageArray[i].width = VoSArray[i].imageWidth;
     		//alert(VoSImageArray[i].src);
     	}
}

function VoS () {
	// Preload the images
	preloader();
	
	// Create image and text objects
	VoSImageObject = document.getElementById('VoSimage');
	VoSTextObject  = document.getElementById('VoStext');
	
	// Init the cycle parameters and call the cycleVision function
	visionDelay = 5;
	visionDisp  = 0;
	visionCount = VoSArray.length;
	cycleVision();	
}