<!--

function is_checked_item(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		if (the_form.elements[i].checked == true){
			return true;
		}
	}
	return false;
}

function check_all(the_form,the_value){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		the_form.elements[i].checked = the_value;
	}
}

function check_uncheck(the_form,the_value){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
			the_form.elements[i].checked = the_value;
	}
}

function change_src(imgname,the_src){
	if (the_src != ""){	
		imgname.src = the_src;
	}
}

function select_list(the_value,the_list){
	var option_count = the_list.options.length;

	for (i=0;i<option_count;i++){
		if (the_value==the_list.options[i].value){
			the_list.options[i].selected	= true;
			return true;
		}
	}

	return false;
}

function radio_list(the_value,the_list){
	var name_count = the_list.length;

	for (i=0;i<name_count;i++){
		if (the_value==the_list[i].value){
			the_list[i].checked=true;
			break;
		}
	}
}	

function get_radio_value(the_list){
	var name_count = the_list.length;

	for (i=0;i<name_count;i++){
		if (the_list[i].checked == true){
			return the_list[i].value;
		}
	}
	return 0;
}


function open_window(the_url, width, height){
	top_val		= (screen.height - height)/2 - 30;
	if (top_val < 0){ top_val	= 0; }
	left_val	= (screen.width - width)/2;

	var new_win = window.open(the_url, "", "toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width="+ width +",height="+ height +", top="+ top_val +",left="+ left_val);
}

function del_confirm(msg) {
	question = confirm(msg)
	if (question != "0"){
		return true;
	}
	return false;
}

function openImage(the_img, the_width, the_height)
{
	winDef = 'status=no,resizable=yes,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes, width='+ the_width +', height='+ the_height;
	winDef = winDef.concat(',top=').concat((screen.height - the_height)/2 - 30);
	winDef = winDef.concat(',left=').concat((screen.width - the_width)/2);
	newwin = open('', '_blank', winDef);

	newwin.document.writeln('<html><title>SoSoVN.com</title><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" height="100%"><a href="" onClick="window.close(); return false;"><img src="', the_img, '" alt="Close" border=1 align="center"></a></td></tr></table>');
	newwin.document.writeln('</body></html>');

	return false;
}

function showDateTime(myDate){
	document.write(myDate);
}
-->
