function runConfirm(t_url, t_msg){
	if(confirm(t_msg)){
		window.location.href = t_url
	}	
}

function runClose()
{	
	window.opener.location.reload();
	window.close();
	
	return;
}

//This function will populate the states dropdown
function populateStates(f_form, t_default)
{	
	a_States = new Array("AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA",
						 "HI","ID","IL","IN","IA","KS","KY","LA","ME","MD",
						 "MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ",
						 "NM","NY","NC","ND","OH","OK","OR","PA","RI","SC",
						 "SD","TN","TX","UT","VT","VA","WA","WV","WI","WY");

	for(count=0; count < a_States.length; count++){
   		f_form.options[count] = new Option(a_States[count]);
		f_form.options[count].value = a_States[count];
 	}
	
	f_form.value = t_default;
	
	return;
}

function openPopUp(url, i_hi, i_wi, i_top)
{
	i_screenWidth = screen.width;
	i_screenHeight = screen.height;

	if((i_hi == '') || (i_hi == 0) || (i_hi == 'undefined')) {
		i_winHeight = 570;
	}
	else {
		i_winHeight = i_hi;
	}
	
	if((i_wi == '') || (i_wi == 0) || (i_wi == 'undefined')) {
		i_winWidth = 770;
	}
	else {
		i_winWidth = i_wi;
	}
	
	if((i_top == '') || (i_top == 0) || (i_top == 'undefined')) {
		i_top = 1;
	}
	else {
		i_top = i_top;
	}
	
	i_left = (i_screenWidth-i_winWidth)/2;			
	
	window.open(url, null,"toolbar=no,scrollbars=no,location=no,resizable =no,height=" + i_winHeight + ",width=" + i_winWidth + ",top=" + i_top + ",left=" + i_left);
	
	return;
}
function stripScripts(markup) {
  return markup.replace(/<script[^>]*?>[\s\S]*?<\/script>/gi, '');
}
//here's how to get the value from the prev fn
//var safeText = stripScripts(textarea.value);
