
	jQuery().ready(function(){
		// simple accordion

		jQuery('#list1b').accordion({
			autoheight: false
		});
		
		// bind to change event of select to control first and seconds accordion
		// similar to tab's plugin triggerTab(), without an extra method
		
		jQuery('#switch select').change(function() {
			accordions.accordion("activate", this.selectedIndex-1 );
		});
		jQuery('.header-expand').click(function() {
			accordions.accordion("activate", -1);
		});
		jQuery('#switch2').change(function() {
			accordions.accordion("activate", this.value);
		});
		jQuery('#enable').click(function() {
			accordions.accordion("enable");
		});
		jQuery('#disable').click(function() {
			accordions.accordion("disable");
		});
		jQuery('#remove').click(function() {
			accordions.accordion("destroy");
			wizardButtons.unbind("click");
		});
	});


function func_newsletter_submit()
{
	if(newsletter_verify()==true)
	{
//		document.newsletter.submit();	
	}
}


	function validateNewsletter()
	{
		lblloginname.addClass("error");
		lblloginname.text("Please enter name !");
		lblloginname.addClass("error");
		return false;
	}
	
var xmlHttp;
function ajaxFunction()
{
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
}
function getLogin(name,email)
{ 
	ajaxFunction();
	xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	{
		var res=trim(xmlHttp.responseText);
		if(res=='true')
		{
			document.getElementById('news_name').value="Name";
			document.getElementById('news_email').value="Email";
			document.getElementById('lblnewsletter').innerHTML="Thank You";
//			document.newsletter.submit();
//			location.href="index.php?msg=1";
		}
		else
		{
			document.getElementById('lblnewsletter').innerHTML="Email already registered";
		}
	}
	}
	xmlHttp.open("GET","news_subs.php?name="+name+"&email="+email,true);
	xmlHttp.send(null);
}

