/*following functionality for hide or show the div for city on explore page. */
document.onclick=check;
function check(e)
{
	var target = (e && e.target) || (event && event.srcElement);
    var obj = document.getElementById('mydiv');
    var obj2 = document.getElementById('sho');
	var obj3= document.getElementById('sho1');
  
    checkParent(target)?obj.style.display='none':null;
    target==obj2?obj.style.display='block':null;
    target==obj3?obj.style.display='block':null;
}

function checkParent(t)
{
	while(t.parentNode)
	{
		if(t==document.getElementById('mydiv'))
		{
			return false
		}
		t=t.parentNode
	}
	return true
}
/*End of the code for div on explore page*/
//this function is for change the name of city on explore page    
function change1(len)
{	
	var frm = document.frmnewindexpage;
	frm.selcity.value=len;
	frm.method="post";
    frm.action="index.php";
    frm.submit();
}
//<![CDATA[
window.addEvent('domready', function()
	{
	    var data = {
	      'img1.png': { caption: 'We have more than <b>400 party services</b>, <a href="http://www.partypotato.com/contact-us.php">contact us</a> for making your event UNIQUE!' }, 

	      'birthday celebration.jpg': { caption: 'Is your super-hero\'s birthday coming up? Check out the <a href="http://www.partypotato.com/view-decoration-hall-front.php?sp=143">Decoration Themes</a> for the UNIQUE <b>Birthday Parties</b>' }, 

	      'corporate party.jpg': { caption: 'Your <b>Corporate Events</b> need to look BIG with delicious food and yet be COST effective celebration. <a href="http://www.partypotato.com/contact-us.php">Contact Us!</a>' },
			  
	      'party hall.jpg': { caption: '<a href="http://www.partypotato.com/explore.php">Check out </a> more than <b>150 Party Halls</b> and choose one and get discount too!' },

		  'restaurants.jpg': { caption: 'Check out more than <b>200 Resorts & Restaurants</b> and get special <a href="http://www.partypotato.com/get-gift-voucher.php ">Discounted Gift Vouchers</a> when you dine next time!' },
		  'Banguet Hall 4.jpg': { caption: 'Planning a <b>Wedding</b>? No hype! but we have amazing and unique ideas for your once in life time event, <a href="http://www.partypotato.com/contact-us.php">Rely on us.</a>' }
       };
	    var myShow = new Slideshow('show', data, {controller: true, height:270, hu: 'images/', thumbnails: false,captions:true, width: 550});
	  });
	  
function LeftSlide()
{
	RunSlideShow("EmilyPicture","EmilyPictureBackground",		"images/invitation_1s1.gif;images/invitationemail_1s1.gif;images/partydetails_1s1.gif;images/serviceprovider_1s1.gif;"+"images/budget_1s1.gif",2); 
}
//]]>
function showdiv()
{
	 var divid=document.getElementById('menu_div').value;
	 var menuid=document.getElementById('sub_menu').value;
	
	 if(!divid)
	 {
		 document.getElementById(1).style.display="block";
	 }
	 else
	 {
          document.getElementById(divid).style.display="block";
		  document.getElementById(menuid).className="current";
	 }
	 }
	 function cloudlink(subCatName,catName,submenu,divid)
	 { // RB-cloudlink change, this helps to track which link is clicked in the cloud and returns the result accordingly. 
     	var frm = document.frmnewindexpage;
		frm.cmbServiceCategory.value=catName;
		frm.serviceSubCat.value=subCatName;
		frm.menu_div.value=divid;
		frm.sub_menu.value=submenu;
		frm.searchString.value = catName+" -- "+subCatName;
		frm.action="explore.php";
 	 	frm.submit();	
	 }
//function for display the next div on home page top_menu
function display_div(len)
{          	 
	if(len<3)
	{	 
	  document.getElementById(len).style.display="none";
	  document.getElementById(len+1).style.display="block";
	}
	else
	{		 
	   document.getElementById(len).style.display="block";
	}	
}
//function for display the previous div on home page top_menu
function display_divprev(len)
{          	 
	if(len>1)
	{	 
		document.getElementById(len).style.display="none";
		document.getElementById(len-1).style.display="block";
	}
	else
	{		 
	   document.getElementById(len).style.display="block";
	}
}
