 
function pop(window_name, pram, width, height){
	//window_name, name of popup window
	//pram, the prameters pass to this popup window
	//width, height, popup demension
	
	if(window.aw_reg){
		aw_reg.focus();
		return;
	}
		
	var netscape = false;
	var popupWin;
	var h, w, h_offset, w_offset;
	var popupProperties;

	h = height;
	w = width;
	
	if (navigator.appName == 'Netscape')
		netscape = true;
	if(navigator.appVersion.indexOf("4.") >= 0) 
		highRes = true;
	else 
		highRes = false;

	//middle of the screen
	w_offset = ((screen.availWidth - w) / 2);
	h_offset = ((screen.availHeight - h) / 2);

	if (highRes == true)
		popupProperties = "toolbar=0,status=0,menubar=0,width="+ w +",height=" + h +",left=" + w_offset + ",top=" + h_offset + ",resizable=0,scrollbars=0";
	else
		popupProperties = "toolbar=0,status=0,menubar=0,width="+ w +",height=" + h +",,,resizable=0,scrollbars=0";

	//open window with given location
	popupWin = window.open(pram, window_name, popupProperties);


} //end function pop() 


function challenge(){

	var all_question = new Array("Date of Birth", "Permanent Credit Limit", "Payment Due Date", "Statement Date", "CVV2 (CVV2 or CVC2)", "Office Telephone Number", "Home Telephone Number", "Embossed Name", "Last 4 digits of Credit Card");
	var question = new Array(3);
	var i, ran;

	for(i = 0; i < 3; i++)
	{
		ran = all_question[Math.round(Math.random() * 10)];
		while(ran == question[0] || ran == question[1] || ran == question[2])
				ran = all_question[Math.round(Math.random() * 10)];
		
		question[i] = ran;
		document.write("<TR><TD CLASS='GreenText'>");
		document.write(question[i]);
		document.write("</TD><TD><INPUT TYPE='TEXT' NAME='");
		document.write(question[i]);
		//0, 2, 3 is date
		if (ran == "Date of Birth" || ran == "Payment Due Date" || ran == "Statement Date")
			{
			 document.write("' VALUE='' SIZE='15'>");
			 document.write("<A HREF='#' onClick=pop('calendar', 'calendar.htm',200,200);>&nbsp;<IMG SRC='graphics/calendar.gif' BORDER='0'></A></TR>");
			} 
		else
			document.write("' VALUE=''></TR>");
	}	
}
