function get_random_success()
{
    //the the maximum number must be the total number of badges minus the number you want to display at any one time
    var maximum = 3;
    var ranNum= Math.floor(Math.random()*maximum);
    return ranNum;
}

//getBadge starts at a random number and displays a configured number of images
function getBadge_success()
{
var whichBadge=get_random_success();
var badge=new Array("success_quote_honeywell.gif",
"success_quote_lucchini.gif",
"success_quote_alstom.gif",
"success_quote_nasa.gif")


 // amountToDisplay should be the number of badges you want displayed at once
 var amountToDisplay = 1;
 var j = whichBadge+amountToDisplay ;
 for (var i=whichBadge; i< j; i++) {

   document.write("<img src=\"images/success_stories/"+badge[i]+"\" />");
 }

}



function get_random()
{
    //the the maximum number must be the total number of badges minus the number you want to display at any one time
    var maximum = 35;
    var ranNum= Math.floor(Math.random()*maximum);
    return ranNum;
}

//getBadge starts at a random number and displays a configured number of images
function getBadge()
{
var whichBadge=get_random();
var badge=new Array("So_cal_edison.jpg",
"acc.jpg",
"ashland.gif",
"adeq.jpg",
"alstom.jpg",
"ascometal.jpg",
"basf.jpg",
"bombardier.jpg",
"brush_ceramics.gif",
"chevron.jpg",
"conoco_philips.jpg",
"dow.jpg",
"ers.jpg",
"exxon.jpg",
"fmc.jpg",
"gillette.jpg",
"great_america.jpg",
"hercules.jpg",
"hitachi.jpg",
"honeywell.jpg",
"hovensa.jpg",
"ivex.jpg",
"lbl.gif",
"lucchini.jpg",
"merck.jpg",
"msa.jpg",
"nasa.jpg",
"nec.jpg",
"northrop.jpg",
"nrc.jpg",
"orion.gif",
"parsons.jpg",
"pg.jpg",
"pge.jpg",
"philips.jpg",
"playa_vista.jpg",
"PoLA.jpg",
"raytheon.jpg",
"republic.jpg",
"roseville_fd.jpg",
"rhodia.jpg",
"shell.jpg",
"TI.jpg")


 // amountToDisplay should be the number of badges you want displayed at once
 var amountToDisplay = 8;
 var j = whichBadge+amountToDisplay ;
 for (var i=whichBadge; i< j; i++) {

   document.write("<img src=\"images/logos/"+badge[i]+"\" />");
 }

}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function changeImages() {
	//alert("box 1: " + document.images + " && " + preloadFlag);
	if (document.images && (preloadFlag == true)) {
		//alert("box 2");
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			//alert("box 3");
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			//alert("Change images: " + document[changeImages.arguments[i]].src + " && " + changeImages.arguments[i+1]);
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		ImageOver1= newImage("/images/img_button_over.jpg");
		ImageOver2= newImage("/images/eng_button_over.jpg");
		ImageOver3= newImage("/images/news_button_over.jpg");
		ImageOver4= newImage("/images/img_ad_image.jpg");
		ImageOver5= newImage("/images/eng_ad_image.jpg");
		ImageOver5= newImage("/images/news_ad_image.jpg");


				preloadFlag = true;
	}
}


// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this
// notice with the code.
// this rollover is used for the get more info page...
// should be rewritten in css - david g 6-11-07

var submitRolls = new Object();

function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit Query";
this.write=submitroll_write;
}

function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;

document.write
	(
	'<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' +
	' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' +
	' HREF="javascript:'
	);

if (this.sendfield)
	{
	if (! this.sendvalue)
		this.sendvalue = 1;
	document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
	}

document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"');
document.write('>');

document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH='  + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');
if (this.sendfield)
	{
	document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
	document.forms[document.forms.length - 1].elements[this.sendfield].value='';
	}
}


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,left = 415,top = 212');");
}

