
//Check Browser Version
var agt     = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);

// Not shown, but is used for some of the other checks.
var is_nav  = ( (agt.indexOf('mozilla') != -1)      &&
                (agt.indexOf('spoofer') == -1)      &&
                (agt.indexOf('compatible') == -1)   &&
                (agt.indexOf('opera') == -1)        &&
                (agt.indexOf('webtv') == -1)        &&
                (agt.indexOf('hotjava') == -1));
var is_nav4     = (is_nav && (is_major == 4));

var alternate_images 		= new Array('../../images/home/nf_parsol2007_800.jpg', '../../images/home/nf_melamine2007_800.jpg', '../../images/home/nf_dyneema200610_800.jpg');
var alternate_images_large	= new Array('../../images/home/nf_parsol2007_high.jpg', '../../images/home/nf_melamine2007_high.jpg', '../../images/home/nf_dyneema200610_high.jpg');


var alternate_images_links = new Array('http://www.dsm.com/en_US/html/about/parsol.htm', 'http://www.dsm.com/en_US/html/about/melamine_new.htm', 'http://www.dsm.com/en_US/html/about/dyneema_purity.htm');

function alternateimage(width) {

	 var i =  Math.floor(Math.random() * alternate_images.length);
	 //var i = alternate_images.length - 1;

	 if (width == 800) {
	 	return (alternate_images[i] + '" onClick="document.location.href=\'' + alternate_images_links[i] +'\'"');
	 }
		else {
	 	return (alternate_images_large[i] + '" onClick="document.location.href=\'' + alternate_images_links[i] +'\'"');
	 }
}

