// Always the first js
var cl_fieldempty		= "#FFFF66";

function popup_text(sid, langid, errno, errstr) {
	window.open('popup_text.php?sid=' + sid + '&errno=' + errno + '&errstr=' + errstr + '&mode=err&langid=' + langid,'easyedit','left=250,top=100,width=600,height=500');
}

function editrecs(php_script, id) {
	newWindow 	= window.open("editrecs", 'editrecs', 'menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbars=yes, width=830, height=460, top=50, left=50');
	goto		= php_script + '?ssid=' + sid + "&id=" + id;
	alert(goto);
	//newWindow.self.location = goto;
}


function gen_formpar(which) {

	str	= "";
	for (i=0;i<which.length;i++) {
		var tempobj=which.elements[i];
		str = str + "&" + tempobj.name + "=" + tempobj.value;
	}
	return str;
}


function set_div(div_id, txt_par) {
	document.getElementById(div_id).innerHTML = txt_par;
}

function get_divhtml(div_id) {
	aa		= document.getElementById(div_id).innerHTML;
	return aa;
}

// for faq


var win = null;

function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
}