	function TooltipTxt(obj)
	{
		//alert(obj);
		if(obj=="question_on")
		{
			var question_text="Set a numerical limit for each choice. <br><br>This is useful for creating an inventory <br>for each choice. <br>(e.g., classes, meal choices, room <br>assignments, etc.) ."
			return question_text;
		}
		if(obj=="message_on")
		{
			var message_text="Include a message to your attendees <br>regarding the registration process."
			return message_text;
		}
		if(obj=="time_limit_on")
		{
			var message_text="The Attendee Transaction Time Limit locks tickets as pending transactions<br> for the time period specified until the attendee completes their registration<br> or the time limit has been exceeded.<br><br>If a transaction doesn't occur in the specified time limit, the tickets<br> will be released. This is to prevent overselling of events."
			return message_text;
		}
		if(obj=="attendee_on")
		{
			var attendee_text="Collect information from just the ticket buyer <br>or from all attendees (tickets purchased)."
			return attendee_text;
		}
		if(obj=="add_question_on")
		{
			var question_text="These questions will be presented to the registrant <br>after they select 'Order Now' on the registration page <br> and before they are sent to the payment page.<br><br> The information you collect here will be viewable <br>and downloadable as part of the attendee report."
			return question_text;
		}
		if(obj=="publish_on")
		{
			var publish_text="<b>Publishing Options</b><br><br>	When you check this option, your event will be available in the <br>following places:<br><ul><li>UTicketIt public event directory</li><li>Major search engines (i.e. Google, Yahoo, MSN, etc)</li>				<li>Event related websites (i.e. Google Base, Eventful, Oodle, etc)</li></ul>An Invite-A-Friend link will also appear on your registration page.<br>"
			return publish_text;
		}
		if(obj=="channel_on")
		{
			var channel_text="This will help better describe your event <br> to search engines  and event indexing sites."
			return channel_text;
		}
		if(obj=="password_on")
		{
			var password_text="<b>Registration Page Password (optional)</b><br><br>You can make your event 'private' by making the <br> registration page only accessible with a password.<br> <br> You create this password and share it with those <br>you wish to attend. "
			return password_text;
		}
		if(obj=="personalized_on")
		{
			var personalized_text="<b>Personalized Event URL</b><br><br>A personalized URL allows your customers to <br>access your event registration page more easily.<br><br>For example, if your personalized URL is 'conference',<br> your attendees can purchase tickets by visiting."
			return personalized_text;
		}
		
		if(obj=="news_on")
		{
			var news_text="Update your attendees with news about your event.<br> Each news item you enter here will appear on your <br> event registration page under the News &amp; Updates section."
			return news_text;
		}
		
		if(obj=="eventurl_on")
		{
			var eventurl_text="<b>Personalized Event URL</b><br><br>A personalized URL allows your customers to <br>access your event registration page more easily.<br><br>For example, if your personalized URL is 'conference', <br>your attendees can purchase tickets by visiting.";
			return eventurl_text;
		}
		if(obj=="orgurl_on")
		{
			var orgurl_text="<b>Personalized Organizer URL</b><br><br>A personalized organizer URL allows your attendees to <br>easily access a list of your upcoming events.<br><br>For example, if your organization name is 'User',<br> your attendees can view a list of your events by visiting.";
			return orgurl_text;
		}
		
		if(obj=="fee_on")
		{
			var fee_text="If you select this option, the UTicketIt fee is added <br>to your ticket price, and attendees pay the total amount <br>directly to  your PayPal account.<br><br>UTicketIt then invoices you monthly to recuperate <br>the fees you collected on our behalf."
			return fee_text;
		}
		if(obj=="fee2_on")
		{
			var fee2_text="If you select this option, the UTicketIt fee is included in <br> your ticket price, and attendees pay the total amount <br> directly to your PayPal account. You  absorb the fees with <br>this option, rather than the attendee.<br><br>Uticketit then invoices you monthly to recuperate <br> the fees  you  collected on our behalf."
			return fee2_text;
		}
		if(obj=="donation_on")
		{
			var donation_text="<b>Donation Format</b><br><br>The donation format allows the attendee to specify how much <br> they would like to pay for a ticket type. <br><br> For example, with this box checked, a user could  make a donation <br>of any amount they wish.Premium service fee apply to this amount."
			return donation_text;
		}
		if(obj=="min_on")
		{
			var min_text="The minimum quantity of this ticket type that an attendee may purchase at one time."
			return min_text;
		}
		if(obj=="max_on")
		{
			var max_text="The maximum quantity of this ticket type that an attendee may purchase at one time."
			return max_text;
		}
		if(obj=="search_on")
		{
			var search_text="Tip: If you search for 'web conference' without the quotes, you <br> will see all events that contain both words 'web' and 'conference'.<br> If you search with quotes, it will return all events that contain the <br>phrase 'web conference'."
			return search_text;
		}
		if(obj=="tickets_on")
		{
			var tickets_text="Tickets remaining will appear for each Ticket Type <br>in the Ticket Order box on your event registration page."
			return tickets_text;
		}
		if(obj=="attendeelist_on")
		{
			var attendeelist_text="A list of confirmed attendees will appear on your <br>event registration page below the Event Details box."
			return attendeelist_text;
		}
		if(obj=="org_on")
		{
			var org_text="This option allows you to remove past events from your Organization's page."
			return org_text;
		}
		if(obj=="billing_on")
		{
			var billing_text="The attendee registers for your event and pays you directly through PayPal. <br>UTicketIt does not touch any of the funds collected - that way we are able <br> to offer a service where you can collect the registration funds directly instead <br>of waiting for us to cut you a check.<br><br> UTicketIt then sends you an invoice via email at the end of the <br>month for the fees you have collected. If you do not sell any tickets, you do <br>not get billed."
			return billing_text;
		}
		if(obj=="fee_on_image")
		{
			var fee_image="<img src='images/include_fee.gif' height='179' width='483'>";
			return fee_image;
		}
		if(obj=="fees_on")
		{
			var fees_text="UTicketIt will add a 6% fee to the ticket price.<br> If your ticket price is below $40, UTicketIt will <br> add a fee of $0.99 to the ticket price. Your attendee <br> will pay the total price, including the fee, and <br>UTicketIt will bill you each month for the fees collected."
			return fees_text;
		}
	}
	
	function MM_openBrWindow(theURL,winName,features) 
	{ //v2.0
		win=window.open(theURL,winName,features);
		win.focus();
	}
	
	/*For Old*/
	/*function numbersonly(evnt)
	{	
	   var unicode=evnt.charCode? evnt.charCode : evnt.keyCode
		if (unicode<48||unicode>57 || unicode==47){
			if(unicode == 43 || unicode == 32 || unicode == 8 || unicode == 9)
				return true;
			else
			{
				return false;
			}
		}
	}*/
	
	/*This function have not allow space*/
	/*function numbersonly(evnt)
	{
		var unicode=evnt.charCode? evnt.charCode : evnt.keyCode
		if (unicode<=46 || unicode>57 || unicode==47 || unicode==32)
		{
			if((unicode == 43 || unicode == 32 || unicode == 8 || unicode == 116 || unicode == 9) && (unicode!=32) && (unicode!=116))
				return true;
			else
				return false;
		}
	}*/
	
	/*This function have not allow space and  allow dot(.)*/
	function numbersonly(evnt)
	{
		var unicode=evnt.charCode? evnt.charCode : evnt.keyCode
		if (unicode<=46 || unicode>57 || unicode==47 || unicode==32)
		{
			if(( unicode == 32 || unicode == 8 || unicode == 9 || unicode == 45 || unicode == 46) && (unicode!=32) && (unicode!=116)  && (unicode!=45) && (unicode!=43))
				return true;
			else
				return false;
		}
	}
	
	function ToggleTr(trName) 
	{
		if (document.getElementById(trName)) 
		{
			if (document.getElementById(trName).style.display == 'none') 
			{
				Show_Tr(trName);
			} 
			else 
			{
				Hide_Tr(trName);
			}
		}
	 }
	 function Show_Tr(trName) 
	 {
		if (document.getElementById(trName)) 
		{
			if (document.getElementById(trName).style.display == 'none') 
			{
				document.getElementById(trName).style.display = '';
			}
		}
	 }
	 function Hide_Tr(trName) 
	 {
		if (document.getElementById(trName)) 
		{
			if (document.getElementById(trName).style.display != 'none') 
			{
				document.getElementById(trName).style.display = 'none';
			}
		}
	 }
	
	function ToggleDiv(divName) 
	{
		if (document.getElementById(divName)) 
		{
			if (document.getElementById(divName).style.display == 'none') 
			{
				Show(divName);
			} 
			else 
			{
				Hide(divName);
			}
		}
	 }
 
	 function Show(divName) 
	 {
		if (document.getElementById(divName)) 
		{
			if (document.getElementById(divName).style.display == 'none') 
			{
				document.getElementById(divName).style.display = 'block';
			}
		}
	 }
 
	 function Hide(divName) 
	 {
		if (document.getElementById(divName)) 
		{
			if (document.getElementById(divName).style.display != 'none') 
			{
				document.getElementById(divName).style.display = 'none';
			}
		}
	 }
  
	 function ShowDiv(divName)
	 {
	 	if (document.getElementById(divName))
		{
			if (document.getElementById(divName).style.display == 'none')
			{
				document.getElementById(divName).style.display = 'block';
			}
		}
	}
	
	function HideDiv(divName)
	{
	 	if (document.getElementById(divName))
		{
			if (document.getElementById(divName).style.display != 'none')
			{
			document.getElementById(divName).style.display = 'none';
			}
		}
	}
	
	function ShowInline(divName) 
	{
	 if (document.getElementById(divName)) 
	 {
		if (document.getElementById(divName).style.display == 'none') 
		{
			document.getElementById(divName).style.display = 'inline';
		}
	 }
   }
   
   function HideInline(divName) 
   {
	if (document.getElementById(divName)) 
	{
		if (document.getElementById(divName).style.display != 'none') 
		{
			document.getElementById(divName).style.display = 'none';
		}
	}
  }
  
  function ShowOrder(trname,obj,length) 
  {
		for(i=1;i<=length;i++) 
		{		
			document.getElementById(trname+i).style.display = "none";
		}
		
		document.getElementById(trname+obj).style.display = "";
	}
	
	
	//*******************************************//
	//	  Function For Window popup             //
	//*****************************************//
	
	function window_location(file)
	{
		window.location=file;
	}
	
	
	function mobval(evnt)
	{
		var unicode=evnt.charCode? evnt.charCode : evnt.keyCode
		if (unicode<47||unicode>57 || unicode==47)
		{
			if(unicode == 8 || unicode == 116 || unicode == 9)
				return true;
			else
				return false;
		}
	}
	
	function telnoNumb(evnt,obj,obj2,numb)
	{
		var unicode=evnt.charCode? evnt.charCode : evnt.keyCode
	
		if (unicode<47||unicode>57 || unicode==47)
		{
			if(unicode == 8 || unicode == 116 || unicode == 9)
			{
				return true;
			}
			else
				return false;
		}
		else 
		{
			if(document.getElementById(obj).value.length>=numb)
			{
				document.getElementById(obj2).focus();
			}
		}
	}
	
	function checkValidNumber()
	{
		val = event.keyCode;
		if(val<48)
		{
		  event.keyCode=0;
		
		  }
		if(val>57)
		{
		  event.keyCode=0;
		
		  }
		return true;
	}
	//##################################################//
	//######  Function for Delete Confirmation  ########//
	//##################################################//
	function delnotevent()
	{
		alert("You have not delete this event,because this event have alredy use in event's ticket order.")
		
	}
	
	//##################################################//
	//######  Function for Delete Confirmation  ########//
	//##################################################//
	function delConfirm()
	{
		ret=confirm('Are you sure you want to delete?');
	
		if(ret==false)
		{
			return false;
		}
		else 
		{
			return true;
		}
	}
	
	//##################################################//
	//######  Function for Cancel Confirmation  ########//
	//##################################################//
	function cancelConfirm()
	{
		ret=confirm('Are you sure you want to Cancel?');
	
		if(ret==false)
		{
			return false;
		}
		else 
		{
			return true;
		}
	}
	
	//##################################################//
	//######  Function for Publish Confirmation  ########//
	//##################################################//
	function publishConfirm()
	{
		ret=confirm('Are you sure you want to Publish?');
	
		if(ret==false)
		{
			return false;
		}
		else 
		{
			return true;
		}
	}
	
	
	function windowopen(url,hig,wid,rez,scrl)
	{
		var win;
		win = window.open(url,""," height="+hig+", width="+wid+", resizable="+rez+",menubar=0,toolbar=0,location=0,directories=0,scrollbars="+scrl+",status=0");
	}
	
	function windowopennew(theURL,winName,wid,hig,title) 
	{ //v2.0
	  
	  var newwindow2;
	   newwindow2=window.open(theURL,winName,wid,hig,title);
	   var tmp = newwindow2.document;
	   tmp.write('<html><head><title>'+title+'</title>');
	   tmp.write('</head>');
	   tmp.write('<body>');
	   tmp.write('<img src="'+theURL+'"');
	   tmp.write('</body>');
	  return false;
	  
	}
	
	function win_new(theURL,title) 
	{ //v2.0
	 var newwindow2;
	 newwindow2=window.open(theURL,title,'menubar=no,toolbar=no,resize=yes,addressbar=no,scrollbars=yes,height=500,width=500,left=50,top=50');
	   var tmp = newwindow2.document;
	   tmp.write('<html><head><title>'+title+'</title>');
	   tmp.write('</head>');
	   tmp.write('<body>');
	   tmp.write('<img src="'+theURL+'"');
	   tmp.write('</body>');
	  return false;
	  
	}
	
	var popUpWin=0;
	
	function popUpWindow(URLStr, left, top, width, height)
	{
	  if(popUpWin)
	  {
		if(!popUpWin.closed) popUpWin.close();
	  }
		width =width+20;
		height=height+30;
	  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	
	}
	
	function CheckAll()
	{
		count = document.selgroup.elements.length;
		for (i=0; i < count; i++) 
		{
			document.selgroup.elements[i].checked = 1;
		}
	}
	function UncheckAll()
	{
		count = document.selgroup.elements.length;
		for (i=0; i < count; i++) 
		{
			document.selgroup.elements[i].checked = 0; 
		}
	}
	
	function checkMe(radio,obj)
	{
		if(radio.checked==1)
		{
			obj.disabled = false;
		}
		else if(radio.checked==0)
		{
			obj.disabled = true;
			obj.focus();
		}
	} 
	
	
	function copy_attendee(formname,ticket_dest,ticket_source)
	{
		var form_id=document.getElementById(formname);
		
		for (var i = 0; i < form_id.length; i++)
		{
			var e = form_id.elements[i];
			
			if (e.id.indexOf(ticket_source) >= 0)
			{
				fieldname = e.id.replace(ticket_source, ticket_dest);
				for (var j = 0; j < form_id.length; j++)
				{
					if (form_id.elements[j].id == fieldname) 
					{
						eDest = form_id.elements[j];
						if (e.type == 'radio' || e.type == 'checkbox') 
						{
							if (e.value == eDest.value) 
							{
								eDest.checked = e.checked;
							}
						} 
						else 
						{
							eDest.value = e.value;
							break;
						}
					}
				}
			}
		}
	}
	
	
	function checkEmail(email) 
	{
		if (window.RegExp)
		{
			var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
			var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$";
			var reg1 = new RegExp(reg1str);
			var reg2 = new RegExp(reg2str);
			if (!reg1.test(email) && reg2.test(email)) 
			{
				return true;
			}
			return false;
		} 
		else 
		{
			if(email.indexOf("@") >= 0)
				return true;
			return false;
		}
	}
	

	function echeck(obj) 
	{
		var str=obj.value;
		var strid=obj.id;
		
		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		
		if (str.indexOf(at)==-1)
		{
		   alert("Invalid E-mail ID");
		   obj.value="";
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
		{
		   alert("Invalid E-mail ID");
		   obj.value="";
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
		{
		    alert("Invalid E-mail ID");
			obj.value="";
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1)
		 {
		    alert("Invalid E-mail ID");
			obj.value="";
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
		 {
		    alert("Invalid E-mail ID");
			obj.value="";
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1)
		 {
		    alert("Invalid E-mail ID");
			obj.value="";
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1)
		 {
		    alert("Invalid E-mail ID");
			obj.value="";
		    return false;
		 }

 		 return true;				
	}


	function highlight(input) 
	{
		input.style.background = '#FFFFCC';
		input.style.border = 'solid 1px black';
	}
	
	function dehighlight(input) 
	{
		input.style.background = 'white';
		input.style.border = 'solid 1px gray';
	}
	
	function setField(input) 
	{
		for (var i = 0; i < document.registrationForm.length; i++) 
		{
			if (document.registrationForm[i].name.indexOf(input.name) >= 0 && document.registrationForm[i].name != input.name) 
			{
				if (document.registrationForm[i].value == '') 
				{
					document.registrationForm[i].value = input.value;
				}
				break;
			}
		}
	}
	
	function checkForm(formname) 
	{
		var form_id=document.getElementById(formname);
		
		for (var i = 0; i < form_id.length; i++) 
		{
			var elem = form_id[i];
			if ((!elem.value || elem.selectedIndex == 0) && (elem.className == 'required' || elem.className == "checkbox required") && elem.style.display != 'none' ) 
			{
				alert("All fields marked with * are required.");
				elem.focus();
				return false;
			}
			/*if (elem.id.indexOf('email') >= 0) 
			{
				elem.value = elem.value.trim();
				if (elem.value && !checkEmailValid(elem.value)) 
				{
					alert("Please double check your email address.  The email address format does not appear valid.");
					elem.focus();
					return false;
				}
				
			}*/
			// Check radio button questions
			if (elem.type == "radio" && (elem.className == 'required' || elem.className == "checkbox required")) 
			{
				checked = false;
				for (var j = 0; j < form_id.length; j++) 
				{
					if (elem.name ==form_id[j].name && form_id[j].checked) 
					{
						checked = true;
					}
				}
				if (!checked) 
				{
					alert("All fields marked with * are required.");
					form_id[i].focus();
					return false;
				}
			}
			if (elem.type == "checkbox" && (elem.className == 'required' || elem.className == "checkbox required")) 
			{
				checked = false;
				for (var j = 0; j < form_id.length; j++) 
				{
					if (elem.name == form_id[j].name && form_id[j].checked) 
					{
						checked = true;
					}
				}
				if (!checked) 
				{
					alert("All fields marked with * are required.");
					form_id[i].focus();
					return false;
				}
			}
		}
		return true;
	}

	
	function calendar_setup(inputid,buttonid,dateformat)
	{
		Calendar.setup({
			inputField     :    inputid,      // id of the input field
			button         :    buttonid,   // trigger for the calendar (button ID)
			ifFormat       :    dateformat,       // format of the input field
			showsTime      :    false,            // will display a time selector
			singleClick    :    false,           // double-click mode
			step           :    1                // show all years in drop-down boxes (instead of every other year as default)
			
				 // show all years in drop-down boxes (instead of every other year as default)
		});
	}
	
	function calendar_addevent(inputid,calendartype)
	{	
	
		calendartype=(calendartype==null)?3:calendartype;
		
		window.addEvent('domready', function() 
		{ 
			if(calendartype==1)
			{
				new vlaDatePicker(inputid);
			}
			
			if(calendartype==2)
			{
				new vlaDatePicker(inputid, 
								  { defaultView: 'year' }
								  );
			}
			
			if(calendartype==3)
			{
				new vlaDatePicker(inputid, 
							  { separator: '-', 
							  format:'m/d/y',
							  leadingZero: false, 
							  twoDigitYear: false, 
							  offset: { y: 3 }, 
							  alignX: 'center', 
							  alignY: 'bottom' }
							  );
			}
			
			if(calendartype==4)
			{
				new vlaDatePicker(inputid, 
							  { prefillDate: 
								  { day: 12, 
								  month: 12, 
								  year: 2012 } }
							  );	
			}
			
			if(calendartype==5)
			{
				new vlaDatePicker(inputid, 
							  { style: 'adobe_cs3', 
							  separator: '-',
							  format: calendar_format, 
							  offset: { y: 1 }, 
							  ieTransitionColor: '' }
							  ); 
			}
			
			if(calendartype==6)
			{
				new vlaDatePicker(inputid, 
							  { style: 'apple_widget', 
							  offset: { x: 3, y: 1 } }
							  );
			}
			
		});	
	}
	
	
	function editor_call(inputid,editortype)
	{	
		editortype=(editortype==null)?"default":editortype;
		
		// Use it to attach the editor to all textareas with full featured setup
		//WYSIWYG.attach('all', full);
		
		// Use it to attach the editor directly to a defined textarea
		if(editortype=="default")
		{
			WYSIWYG.attach(inputid); // default setup			
		}
		if(editortype=="full")
		{	
			WYSIWYG.attach(inputid, full); // full featured setup
		}
		if(editortype=="small")
		{
			WYSIWYG.attach(inputid, small); // small setup
		}
	
		// Use it to display an iframes instead of a textareas
		//WYSIWYG.display('all', full); 
	}
	
