//document.oncontextmenu=new Function("event.returnValue=false;");
//document.onselectstart=new Function("event.returnValue=false;");

function go_page (the_url){
		location.href=the_url;
		return false;
}

function get_sc(t,type){
	var cs_type = type;
	//window.showModelessDialog("specialty_curriculum.php?type="+cs_type+"",t,"status:0;help:0;resizable:0;scroll:no;dialogWidth:400px;dialogHeight:160px");
	window.showModalDialog("specialty_curriculum.php?cs_type="+cs_type+"",t,"status:0;help:0;resizable:0;scroll:no;dialogWidth:400px;dialogHeight:160px");
}

function select_date(obj , show_time){
	var time = (show_time != '')?("?show_time="+show_time):("");
	window.showModalDialog("realconf/Tools_Select_Date.php"+time , obj,"status:0;help:0;resizable:0;scroll:no;dialogWidth:210px;dialogHeight:210px");
}

function post_vars (varslist , action){
	var thevars = varslist.split("&");
	var new_form = '<form name = "frm_real_vars" method = "post" action = "' + action + '">';
	for (i = 0 ; i < thevars.length ; i++){
		curr_vars = thevars[i].split("=");
		if (curr_vars.length == 2)
			new_form += '<input name =' + curr_vars[0] + ' value = ' + curr_vars[1] + ' type = "text" style = "display:none;" />';
	}
	new_form += '</form>';
	window.document.write(new_form);
	window.document.frm_real_vars.submit();
}

function SetUrl( url, width, height, alt )
{
	document.getElementById("img").value = url;
}

function open_url(type, app_path){
	window.open(app_path + "/realconf/fckeditor/editor/filemanager/browser/default/browser.html?Type="+type+"&Connector=connectors/php/connector.php","image","height=400,width=740,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no");
}

function font_zoom(obj, font_size) {
	//document.getElementById(obj).style.fontSize = font_size;
	document.getElementById(obj).style.zoom = font_size;
}

function check_all(form){
	var sign = (form.select_all.checked)?(0):(2);
	for (var i=0; i<form.elements.length;i++ ){
		if (form.elements[i].type == "checkbox"){
			var e=form.elements[i];
			if (sign==0) e.checked= true;
			if (sign==1) e.checked= !e.checked;
			if (sign==2) e.checked= false;
		}
	}
}
