

window.onload = initialize;

function initialize()
	{

	// on splash page display random model
	if ( document.body.className=="splash" )
		{ rndSplashModel(); }
	if ( document.body.className=="hcpsplash" )
		{ rndSplashModelHcp(); }
		
	}





// if true, will display generated html in alert dialog
var debugModel = false;
// if false, will not write to page;
var writeModel = true;	

// names of images are templated;
// only need to be aware of width and height of model images
var model = new Array
	(
	// width of left column is currently 315px;
	// make sure big left images are not larger than that.
	{  "widthSmall":172,  "heightSmall":240,  "widthLarge":303,  "heightLarge":452   }, 
	{  "widthSmall":195,  "heightSmall":153,  "widthLarge":309,  "heightLarge":448   }, 
	{  "widthSmall":195,  "heightSmall":162,  "widthLarge":302,  "heightLarge":479   }
	);
	
	var modelHCP = new Array
	(
	// width of left column is currently 315px;
	// make sure big left images are not larger than that.
	{  "widthSmall":172,  "heightSmall":240,  "widthLarge":303,  "heightLarge":452   }, 
	{  "widthSmall":195,  "heightSmall":153,  "widthLarge":309,  "heightLarge":448   }, 
	{  "widthSmall":195,  "heightSmall":153,  "widthLarge":309,  "heightLarge":448   }, 
	{  "widthSmall":195,  "heightSmall":162,  "widthLarge":302,  "heightLarge":479   }
	);
var howManyModelImages = model.length;
var howManyModelImagesHCP = modelHCP.length;

// image html parts
var i1 = '<img src="images/global/models/model';
var i2 = '.jpg" alt="Model" width="';
var i3 = '" height="';
var i4 = '" border="0" />';

// on splash page, populate a random image
// in the left column and a smaller image
// in the main body
/*
function rndSplashModel()
	{
	var whichModel = Math.floor(Math.random()*howManyModelImages);
	var count=whichModel+1;
	var smw = model[whichModel]["widthSmall"];
	var smh = model[whichModel]["heightSmall"];
	var lmw = model[whichModel]["widthLarge"];
	var lmh = model[whichModel]["heightLarge"];

	// left Column model
	var largeModel = i1 + count + "_large" + i2 + lmw + i3 + lmh + i4;
	// model in main body
	var smallModel = i1 + count + "_small" + i2 + smw + i3 + smh + i4;
	
	if ( debugModel ) { alert(largeModel); alert(smallModel); }
	// write the two model images onto the page.
	if ( writeModel )
		{ 
		var leftColumnModel = document.getElementById("leftColumnModel");
		if(leftColumnModel!=null) leftColumnModel.innerHTML = largeModel
		var rightColumnModel = document.getElementById("rightColumnModel");
		if(rightColumnModel!=null) rightColumnModel.innerHTML = smallModel
		}
	}
	
	

*/


// image html parts
var i5 = '<img src="../images/hcp/left-column/doctor';
var i6 = '.gif" alt="hcp" ';
var i9 = 'width="180'
var i7 = '" height="250';
var i8 = '" border="0" />';
/*	
function rndSplashModelHcp()
{
	var whichModel = Math.floor(Math.random()*howManyModelImagesHCP);
	var countHCP=whichModel+1;
	
	// left Column model
	var hcp = i5 + countHCP  + i6+ i9 + i8;
	// model in main body
	//var smallModel = i1 + count + "_small" + i2 + smw + i3 + smh + i4;
	
	if ( debugModel ) { alert(largeModel); alert(smallModel); }
	// write the two model images onto the page.
	if ( writeModel )
		{ 
		document.getElementById("leftColumnModel").innerHTML = hcp;
		
		}
	
}*/