 	/*###################################################################################
	#								COPYRIGHTS											#
	#																					#
	#		Cybertechnics Systems Limited - v12 universal ebusiness system				#
	#		www.myv12.com																#
	#																					#
	#-----------------------------------------------------------------------------------#
	#								FILE DESCRIPTION									#
	#																					#
	#		Languo javascript handler file												#
	#-----------------------------------------------------------------------------------#
	#								AUTHOR												#
	#																					#
	#		author: 			viktor													#
	#		date created: 																#
	#																					#
	#-----------------------------------------------------------------------------------#
	#						FILE HISTORY - MODIFICATIONS								#
	#																					#
	#		modified by: 	viktor - 150210												#
	#		code modified:	the summarieser panel tab linking wasn't work by the 		#
	#						cornered div jquery technology								#
	#-----------------------------------------------------------------------------------#
	#							REQUIREMENTS AND LOCATION								#
	#																					#
	#		location of this file:	[v12 root]/modules/formbuilder						#
	#																					#
	#		required files:																#
	#																					#
	#		required variables:															#
	#																					#
	###################################################################################*/

// JavaScript Document

function messageHandler(){
	$(".helpBox")
		.bind("mouseenter", function(e){
			if (!$(this).attr("rel")  ) return false;
			if ($("#helpBox")) $("#helpBox").remove();
			$(document.body).append("<div id=\"helpBox\" style=\"position:absolute; top:"+e.pageY+"px; left:"+e.pageX+"px; \"></div>");
			$("#helpBox").text( $(this).attr("rel") ).css("display","block");
		})
		.bind("mouseleave", function(){ 
			if (!$("#helpBox")  ) return false;
			$("#helpBox").css("display","none");
		});
}

function homepageOnloadEvent( multiAllItem ){
	multiAllItem = (multiAllItem)?multiAllItem:false;

	// provider form panel initializing
	//$("div.round_top").corner("top 5px");								// fixing: this row cause problem in IE8
	$("#choose_menu li:first").find("a div").addClass("active_tab");
	
	// click event on a provider form's tab
	$("#choose_menu a").click(function(){
		var choose = $(this);
		$("#loading").fadeIn(300,function(){
			$("div.choose_menu_div").hide();
			var ch_value = choose.attr('id')+'_div';
			
			// active tab handling
			$("#choose_menu a div").removeClass("active_tab");
			choose.find("div").addClass("active_tab");
			
			// multiple dropdown handling
			$("#"+ch_value).show(1,function(){
				$(this).find(".multiple").dropdownchecklist({ firstItemChecksAll: false, checksAllByImage: multiAllItem, maxDropHeight: 200, width: 140 }).ready(function(){
					$("#loading").fadeOut(300);															 
				});
			});			
			
		});
		return false;
	});
}

function ttt(){
		if ( document.getElementById("choice15").checked ) $("#reg_submit").fadeIn(500);	
		if ( document.getElementById("choice15").checked == false ) $("#reg_submit").css("display","none");	
}
