
//************************************************************ LOAD BUTTON MOUSEOVERS ************************************************
if(document.images)
{
	home = new Image();
	home.src = "images/buttons/home.gif";
	homeover = new Image();
	homeover.src = "images/buttons/homeover.gif";

	about = new Image();
	about.src = "images/buttons/about.gif";
	aboutover = new Image();
	aboutover.src = "images/buttons/aboutover.gif";

	contactus = new Image();
	contactus.src = "images/buttons/contactus.gif";
	contactusover = new Image();
	contactusover.src = "images/buttons/contactusover.gif";

	take = new Image();
	take.src = "images/buttons/take.gif";
	takeover = new Image();
	takeover.src = "images/buttons/takeover.gif";
}

//************************************************************ SHOW MOUSEOVER IMAGE ************************************************
function mouseover(imgName) 
{
 if (document.images) 
	{
	imgOn=eval(imgName + "over.src"); 
	document[imgName].src= imgOn;
	 } 
}

//************************************************************ SHOW MOUSEOUT IMAGE ************************************************
function mouseout(imgName)
{
 if (document.images)
 {
 imgOff=eval(imgName + ".src"); 
 document[imgName].src= imgOff;
 }
}

//************************************************************ ADD ROW DYNAMICALLY TO TABLE ************************************************
var i = 0
function addRow(tableName, maxRows)
{
	var tbl = document.getElementById(tableName);
	var lastRow = tbl.rows.length;
	var newRowInnerHTML = "";
	var questionNumber = tableName.substr(5,2);

	if(lastRow < maxRows)
	{
		var row = tbl.insertRow(lastRow);
			
		var newCell = row.insertCell(0);
  
	 	newCell.className = "cellbackground";
	     	newRowInnerHTML = dynamicQuestionsHTML(questionNumber);
	     	newCell.innerHTML = newRowInnerHTML ;	
	}
}

//************************************************************ REMOVE ROW DYNAMICALLY FROM TABLE ************************************************
function removeRow(tableName, minRows)
{
	var tbl = document.getElementById(tableName);
	var lastRow = tbl.rows.length;
	if (lastRow > minRows) tbl.deleteRow(lastRow - 1);
}


//************************************************************ OPEN WINDOW CENTERED IN SCREEN *********************************************
function openWin(URL, w, h)
{
	var width = screen.availWidth;
	var height = screen.availHeight;
	var win=window.open(URL, '', 'width=' + (w+20) + ', height=' + (h+30) + ', scrollbars=1, left=' + ((width - w - 10) * .5) + ',top=' + ((height - h - 30) * .5));
	win.focus();
}

var popupwindow
//************************************************** OPEN WINDOW CENTERED IN SCREEN - NO SCROLLBARS *********************************************
function popUp(URL, w, h)
{
	var width = screen.availWidth;
	var height = screen.availHeight;
	popupwindow=window.open(URL, '', 'width=' + (w+20) + ', height=' + (h+30) + ', scrollbars=0, left=' + ((width - w - 10) * .5) + ',top=' + ((height - h - 30) * .5));
	popupwindow.focus();
}