var obj_new_win;

function status_msg(txtin){
	window.status = txtin;
}//end function status_msg(txtin)

function custom_link(strLink){
	window.location=(strLink);
	return null;
}//function custom_link(strLink)

function file_download(strLink){
	window.location=(strLink);
	return null;
}//function file_download(strLink)


//this function the url in a new window using the predefined co-ordinates (almost maximized)
function open_page(txtin){
//txtin is the URL
var win_ht = screen.availHeight - 110
var win_wt = screen.availWidth - 10
var win_dim = "height=" + win_ht + ", width=" + win_wt

obj_new_win = open(txtin, "newwin", win_dim + ", scrollbars, toolbar, status, resizable, menubar,left=0,top=0");

}//function open_page(txtin){


function crsrdefault(objId){
document.getElementById(objId).className = 'cursornorm';
}//function crsrdefault(objId)

function crsrhand(objId){
document.getElementById(objId).className = 'cursorhand';
}//function crsrdefault(objId)


function chkbtn_test(objIn, chkbox){

var txt_email_list = "";
var txt_email_body = "";
var txt_email_subject = "";
var count = 0;

//test
//alert(objIn.name);
txt_email_subject = "Sybject: " + objIn.txt_subject.value + "\n";//
txt_email_body = "Name: " + objIn.txt_name.value + "<br>\n";
txt_email_body = txt_email_body + "Email: " + objIn.txt_email.value + "<br>\n";
txt_email_body = txt_email_body + "Comments: " + objIn.txta_comment.value + "<br>\n";//
txt_email_body = txt_email_body + "Link: " + objIn.txt_link.value;//
alert (txt_email_subject + txt_email_body);
//return false;
//test
//test the status of checkboxes to determine the recipients of the email
	for (j = 0; j < chkbox.length; j ++) {
		if (chkbox[j].checked){
			txt_email_list = txt_email_list + chkbox[j].value + ", " + "<br>\n";
			count++
		}//if (objIn[j].checked){
	}//for (j = objIn.length; j < 12; j ++) 

//test
alert (chkbox.length + ", " + count);
//test

	if (txt_email_list){
		alert(txt_email_list);
	}//	if (txt_email_list)
window.location=("mail_sent.php?email_list=" + txt_email_list + "&email_subject=" + txt_email_subject + "&email_body=" + txt_email_body);
}//function chkbtn_test()

