// S.S - remove Airtel branding
//######################################## TOOLTIP ########################################

var x,y,zInterval;
document.onmousemove = setMouseCoords;

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
/*
function init() {
	for(i=0;i<document.getElementsByTagName("a").length;i++) {
		if(document.getElementsByTagName("a")[i].className == "toolLink") {
			document.getElementsByTagName("a")[i].onmouseout = hideToolTip;
		}
	}
}
*/
function setMouseCoords(e) {
	if(document.all) {
		x = event.clientX+ietruebody().scrollLeft;
		y = event.clientY+ietruebody().scrollTop;
		//x = window.event.clientX;
		//y = window.event.clientY;
	} else {
		x = e.pageX;
		y = e.pageY;
	}
}

function showToolTip(id) {
	clearInterval(zInterval);
	var is_right = false;
	switch(id)
	{
		case 'zonetitle' :
			zTitle = "Zone Title";
			zText = "It could be catchy, fun, something that describes you, your style :-)<br>Use the HTML editor to customize the font, color, size & make it STAND OUT!";
			break;
		case 'describeyourself' :
			zTitle = "Some insight about who you are";
			zText = "Talk a lil about yourself here. The kind of person you are, your funny side... your attitude towards life, friends and more... A lil about your family, your pets (if any).<br>Write as much as you can, this will give other Zones members an insight to your life & befriend you :-)";
			break;
		case 'interestshobbies' :
			zTitle = "Interests & hobbies";
			zText = "The best part... each of us has certain interests & hobbies and like to tell others about it. Sports, book reading, movie buff, computer geek, anything goes really.<br>Hobbies well, coin/ artefact&#39;s collection, books, clothes, recycling waste, working out, running, shopping, what ever you are into :-)";
			break;
		case 'favoritemusic' :
			zTitle = "Favorite Music & Artists";
			zText = "Bollywood, heavy metal, soft rock, pop, hip-hop, classics music, the 80&#39;s, 90&#39;s fan??<br>Mention your favorite band, lead guitarist, singer, your favorite songs and more...<br>Got some album/ artist photo, put it up here & let everyone know your taste!";
			break;
		case 'favoritebooks' :
			zTitle = "Favorite Books & Authors";
			zText = "Ooo, the book-worms... :) welcome. Talk about what you feel are MUST reads :-).<br>Share the kind of books that interest you. From fiction, to drama, romantic novels to non-fiction, Tin-tin &  Asterix... anything you&#39;re fond of and would like to recommend for fellow Zones members to  read up on.";
			break;
		case 'favoritemovies' :
			zTitle = "Favorite Movies, Actors & Directors";
			zText = "Bollywood, hollywood flicks? Festival/ regional movies?? Classics from the 60&#39;s to 80&#39;s???<br>Whatever is your taste, let others get a glimpse, you&#39;ll surely find someone who shares the same interests. Mention your favorite movie(s), actors you just worship, directors you feel are unmatched till date and more...";
			break;
		case 'fromgroup' :
			zTitle = "From photo group/ BLOG group icons";
			zText = "The icons on the right will be visible against a few of the messages you receive.<br>These icons indicate they have been sent to you from Photo &/or BLOG interest groups you may have subscribed to.";
			break;
		case 'tags' :
			zTitle = "Tags";
			zText = "Tags are another form of keywords. You can define one more more tags for each photo added. These tags will help you as well as other members search photos that have something in common.<br>E.g. Photos &#39;tagged&#39; with &#39;beach&#39; will display images relating to water, beaches, etc...";
			break;
		case 'common_tags' :
			zTitle = "Common Photo Tags";
			zText = "You can assign common tags to the photos. Tags are keywords which help you find your photos easily. You can add common photo tags later.";
			break;
		case 'grouptags' :
			zTitle = "Tags";
			zText = "Tags are keywords that you can assign to the groups you have created. Members can quickly find groups they are interested in, by using a group tag search.<br>E.g. If you are creating a group related to say &#39;Jive&#39; or &#39;Salsa&#39;, then you can add &#39;dance&#39; as a group tag.";
			break;
		case 'tagsearch' :
			zTitle = "Tag Search";
			zText = "Use this option to search for tags given by other members to their Photos.<br><br><li>To search for multiple tags, separate them with a comma (e.g. Love, Heart, Passion).<br><li>To search for tags with multiple words, separate them with a space (e.g. Best of luck, My fair lady)";
			break;
		case 'phototags' :
			zTitle = "Tags";
			zText = "Tags are keywords that you can assign to the photos you have uploaded. These tags help you find photos which have something in common.";
			break;
		case 'login' :
			zTitle = "Keep me signed in, unless I logout";
			zText = "When you select this option and login, you can be logged into your account permanently. You will not need to login the next time you visit Fropper.com.<br><u>Note:</u> Selecting this option is safe only if you don&#39;t share your computer with others.";
			break;
		case 'imagetitle' :
			zTitle = "Image title";
			zText = "You have the option to give a title to every image you upload.";
			break;
		case 'description' :
			zTitle = "Description";
			zText = "You can add a few words describing the image. The description will be visible to all whom you choose to display this picture.";
			break;
		case 'category' :
			zTitle = "Category";
			zText = "Choose categories for your BLOG post. Classifying posts into relevant categories makes it easy for members to search for posts that have something in common. You can choose up to three categories for a single BLOG post.";
			break;
		case 'mymood' :
			zTitle = "My Mood";
			zText = "Let others know how you feel while making this post. Choose a mood from this list.";
			break;
		case 'articletags' :
			zTitle = "Article Tags";
			zText = "Tags are another form of keywords. These tags will help you as well as other members search posts that have something in common. You can define multiple tags for a photo by separating it with comma (e.g beach, sea, water)";
			break;
		case 'privacysetting' :
			zTitle = "Privacy Setting";
			zText = "When you make a post on Fropper Zones, you can define who can view, subscribe to your posts or read/write comments to it.";
			break;
		case 'changepassword' :
			zTitle = "Change password";
			zText = "Changing your password here, will reflect in your Fropper Relationships account as well. To login to Fropper (Relationships or Zones), be sure to use this password.";
			break;
		case 'emailaddress' :
			zTitle = "Email address";
			zText = "Changing your Email address here, will reflect in your Fropper Relationships account as well. To login to Fropper (Relationships or Zones), be sure to use this Email address.";
			break;
		case 'location' :
			zTitle = "Change Location";
			zText = "Any changes to your location details here, will reflect in your Fropper Relationships account as well.";
			break;
		case 'zonename' :
			zTitle = "Zone Name";
			zText = "The Zone name is your identity on Fropper Zones. Some examples: Navin2000, RajVirgo, Viki2Cool, BikeFreak etc.";
			break;
		case 'mayoffend' :
			zTitle = "May offend?";
			zText = "Find this photo/ post is objectionable? Inform us by clicking on the \"May offend\" link.";
			break;
		case 'photo_mayoffend' :
			zTitle = "May offend?";
			zText = "Find this photo/comment objectionable? Inform us by clicking on the \"May offend\" link.";
			break;
		case 'timezone' :
			zTitle = "Time Zone";
			zText = "Choose the correct Time Zone for your city. Changing your Time Zone here, will reflect in your Fropper Relationships account as well.";
			break;
		case 'publicgroup' :
			zTitle = "Public Group";
			zText = "These are groups where any member can join in, post topics, list events, post replies, invite their friends, leave scraps & much more.";
			break;
		case 'protectedgroup' :
			zTitle = "Protected Group";
			zText = "These are groups where member joining in will need the approval of the Group owner. Based on rights set by the owner, the member can then do various activities.";
			break;
		case 'privategroup' :
			zTitle = "Private Group";
			zText = "These are groups where members are invited personally by the Group owner. A Private group cannot be converted to \"Public\" or \"Protected\".";
			break;
		case 'blogtags' :
			zTitle = "Tags";
			zText = "Tags are keywords that you can assign to your ezBlog posts. Members can quickly find ezBlogs they are interested in, by using the tag search.<br>E.g. If you are creating a new post related to a &#39;hindi movie&#39;, then you can add &#39;bollywood, actors name, movie name&#39; as the post tags.";
			break;
		case 'permalink' :
			zTitle = "Permalink";
			zText = "Permalink is a direct URL to refer to a specific ezBlog Post. Even if this Post is changed, renamed, or moved, its Permalink remains unaltered. To access this Post, simply copy and paste this URL on the web browser; Or if you email this URL to your friends/family, it will still point to this specific Post.";
			break;
		case 'pinging' :
			zTitle = "Pinging";
			zText = "This means that whenever you save a new post, other websites will automatically be contacted and told that you have updated your site. Then, you&#39;ll appear in the site listing, driving more traffic to your ezBlog.";
			break;
		case 'peoplesearch' :
			zTitle = "People Search";
			zText = "If you wish to enter multiple keywords, separate them with a space. Please avoid special characters (e.g. <span class=\"orange\">@ # $ , % *</span> ) or common words (e.g. <span class=\"orange\">and</span>, <span class=\"orange\">for</span>, <span class=\"orange\">from</span>, <span class=\"orange\">the</span>) as keywords for People Search.";
			break;
		case 'shaadi_com_reg' :
			zTitle = "Register on Shaadi.com";
			zText = "By selecting this option you&#39re expressing your interest in registering with the Shaadi.com service. Your registration will only be recorded after you click a link in the confirmation email we will send you.";
			break;
		case 'astro_com_reg' :
			zTitle = "Register on Astrolife.com";
			zText = "Your Free registration entitles you to Rs.100 Gift Voucher in addition to Daily Forecast by email, Free Chinese compatibility matching, Free Tarot readings and much more. You will receive an email with details.";
			break;
            /* 21/05/2007 Pratik "New Dashboard & Blurb" Tooltips ST*/
		case 'dashboard_pinleft' :
			zTitle = "Fix / Unfix Tabs";
			zText = "When you click &#39;Fix&#39; in a particular section, it will load by default on the dashboard. To undo this setting, simply click on the &#39;Unfix&#39; link. <br><br>e.g. If you want the &#39;Explore Photos&#39; section to be displayed whenever you access your dashboard, then click on the &#39;Explore Photos&#39; tab and click on the &#39;Fix&#39; link. The tab will get pinned until you choose to &#39;Unfix&#39; it.";
			break;
		case 'dashboard_pinright' :
			zTitle = "Fix / Unfix Tabs";
			zText = "When you click &#39;Fix&#39; in a particular section, it will load by default on the dashboard. To undo this setting click on the Unfix link that replaces it. <br><br>e.g. If you want the &#39;New People&#39; section to be displayed whenever the dashboard loads, then click on the &#39;New people&#39; tab and click on the &#39;Fix&#39; link. The tab will get pinned until you choose to &#39;Unfix&#39; it.";
			break;
            /* "New Dashboard & Blurb" Tooltips EN*/

			/* "Specials Opt-in for Newsletter" 20/06/2007 ST*/
		case 'optin_newsletters' :
			zTitle = "Fropper Newsletter";
			zText = "Keep yourself updated on new features, enhancements & other important information on Fropper.com.";
			break;
		
		case 'weekly_newsletter' :
			zTitle = "'Your Weekly Update' mailer";
			zText = "Catch up with activity in your Fropper account in the last 7 days. This weekly mailer will be sent only if you have not logged into your account for more than 7 days.";
			break;

		case 'latest_newsletter' :
			zTitle = "'Latest on Fropper' mailer";
			
			/*
			zText = "Get an update of all the action in Photos, Zones, ezBlogs & Groups. This weekly mailer will be sent only if you have not logged into your account for more than 7 days.";
			*/

			
			zText = "Get an update of all the action in Photos, Videos, Zones, ezBlogs & Groups. This mailer will be sent to you once in 7 days."

			break;

		case 'partner_newsletter' :
			zTitle = "Partner Offers";
			zText = "Don\\'t miss out on exclusive offers, contests & cool prizes from our partners.";
			break;

		case 'travel_deal' :
			zTitle = "India\'s best travel deals";
			zText = "By selecting this option, you\\'re expressing your interest in receiving India\\'s best travel deals through a weekly mailer sent by our partner - tripMela.com.";
			break;

		case 'shoutout_tooltip' : 
			zTitle = "Shout-out";
			zText = "Simply shout at your friends by typing a message. Shout-out is personal message to let everyone know \"What are you doing now?\"";
			break;

		case 'private_scrap' : 
			zTitle = "Private scrap";
			zText = "Private scrap will be visible only to the member and will appear on the member&#39;s scrap page.";
			break;

		case 'send_chat' : 
			zTitle = "Send to all";
			zText = "Use this option to send a chat message to all members in one go.";
			break;

		case 'refresh_chat' : 
			zTitle = "Refresh";
			zText = "Due to your internet connection problems, at times, this chat console may not load the latest chats. In such a case, you can click on the Refresh link to view new chats.";
			break;

		case "block":
			zTitle = "Block User";
			zText = "By blocking this user you will NOT receive any communication from this user. To manage your Block List, please go to My Zone > Settings > My Block List.";
			break;

		case "unblock":
			zTitle = "Unblock User";
			zText = "You have blocked this user. If you wish to receive communication from this user, please unblock. To manage your Block List, please go to My Zone > Settings > My Block List.";
			break;

			/* "Specials Opt-in" EN */
			
			/* "photo bucket ST*/
		case 'addallpagephotos' :
			zTitle = "Add all photos on this page";
			zText = "Adds all photos on this page to the Photo Bucket so that you can edit details, organize them into sets, define privacy settings & a lot more.";
			break;

		case 'removephotos' :
			zTitle = "Remove";
			zText = "Removes all selected photos on this page from the Photo Bucket.";
			break;
			/* "photo bucket EN*/

			/* "voice scrap tooltip" */
			case 'uploadprivatevoicescrap' :
			zTitle = "Send Private Voice Scrap";
			zText = "Private Voice Scraps will be visible only to the recipient.";
			break;

			case 'uploadvoicescrap' :
			zTitle = "Send Voice Scrap";
			zText = "You could record your Voice Scrap using a mobile phone and then transferring the audio file to your PC. <br>Alternately, you can use the Windows  \\'Sound Recorder\\' software to record your Voice Scrap.";
			break;

			case 'photo_batch_uploader':
			zTitle = "Photo Batch Uploader";
			zText = "The Photo Batch uploader allows you to upload multiple photos at one go.You can directly add these photos to an existing set, define privacy and also add common tags to these photos.";
			break;
			

			case 'photoSubscribe':
			zTitle = "Photo Subscribe";
			zText = "Click on the subscribe link, if you want to receive alerts in your fropper inbox when there are new comments on this photo.";
			break;

			case 'photoUnSubscribe':
			zTitle = "Photo Unsubscribe";
			zText = "To stop receiving new comment alerts for this photo, click unsubscribe.";
			break;

			case 'photoOwnSubscribe':
			zTitle = "Photo Subscribe";
			zText = "You are auto-subscribed to receive alerts in your Fropper Inbox whenever a new comment is posted on your photos.";
			break;

			case 'blogSubscribe':
			zTitle = "Subscribe";
			zText = "Click on the subscribe link if you want to receive alerts in your Fropper Inbox whenever a new comment is added to this ezBlog post.";
			break;

			case 'blogUnSubscribe':
			zTitle = "Unsubscribe";
			zText = "To stop receiving new comment alerts for this ezBlog post, click unsubscribe.";
			break;

			case 'blogOwnSubscribe':
			zTitle = "Subscribe";
			zText = "You are auto-subscribed to receive alerts in your Fropper Inbox whenever a new comment is posted on your ezBlog post(s).";
			break;

			case 'setLanguagePref':
			zTitle = "Language/Genre Selection";
			zText = "When you set a particular Language/Genre as your default, all your future visits to Fropper Music will be directed to your chosen Language/Genre.<br/> Note: You can change it whenever you like.";
			is_right = true;
			break;

			case 'managesets':
			zTitle = "Manage Sets";
			zText = "\\'Manage Set\\' allows you to add photos to set,  share set, add common tags, edit details, change cover photo and lot more using Photo Bucket.";
			break;

			case 'add_link_to_photo':
			zTitle = "Add link to photo";
			zText = "Enter URL of the website you want to link with photo.";
			break;
}
	zInterval = setTimeout("doShowToolTip('" + zText + "'," + is_right + ")",1);
}

function doShowToolTip(zText,is_right) {
	zDiv = "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='small darkgray'><tr><td width='3' rowspan='2'><spacer type='block' width='3'></td><td style='border-top: 1px solid #d1dada; border-left: 1px solid #d1dada; padding: 5px;'><div class='medium darkgray' style='background: #e9f5ff; padding: 3 5px;'><a href=# class='img' onclick='hideToolTip(); return false'><img src='/zones-ssi/js-css-images/close.gif' width='13' height='13' border='0' align='right' hspace='0'></a><b>"+ zTitle +"</b><br clear='all'></div><div style='padding: 7px; border-bottom: 4px solid #dbebff;'>"+ zText +"</div></td><td width='5' background='/zones-ssi/js-css-images/rgt-sdw.gif'><spacer type='block' width='5'></td></tr><tr height='5'><td background='/zones-ssi/js-css-images/btm-sdw.gif'><spacer type='block' height='5'></td><td><img src='/zones-ssi/js-css-images/rgt-btm.gif' width='5' height='5' border='0'><br></td></tr></table>";
//<div style='text-align: right;'><a href=# class='noborder' onmouseover="showToolTip('zonetitle');" onclick='hideToolTip(); return false'>[x]</a></div>

	clearInterval(zInterval);
	
	if(is_right)
	{
	document.getElementById("toolTip").style.top = (y+10) + "px";
	document.getElementById("toolTip").style.left = (x-275) + "px"
	}
	else
	{
	document.getElementById("toolTip").style.top = (y+5) + "px";
	document.getElementById("toolTip").style.left = (x+5) + "px";
	}
	document.getElementById("toolTip").innerHTML = zDiv;
	document.getElementById("toolTip").style.display = "block";
	
	zInterval = setTimeout("hideToolTip()",15000);
	
}

function hideToolTip() {
	document.getElementById("toolTip").style.display = "none";
	clearInterval(zInterval);
}

//this.onload = init;

function toggleMe(a){
	var e=document.getElementById(a);
	if(!e)return true;

	e.style.display="block"
	/*if(e.style.display=="none")
	{
		e.style.display="block"
	}
	else
	{
		e.style.display="none"
	}*/

	return true;
}

function hideMe(a)
{
	var e=document.getElementById(a);
	if(!e)return true;

	e.style.display="none"
	return true;
}


function show_block(divID1, divID2, errorDiv, colorID)
{
	document.getElementById(divID1).style.display = 'none';
	document.getElementById(divID2).style.display = 'block';
	document.getElementById(errorDiv).style.display = 'none';
	document.getElementById(divID1).style.background = colorID;
}

function show_color(divID, colorID)
{
	document.getElementById(divID).style.background = colorID;
}

function block_confirm(blocked_member_id,disp_div,class_name, page)
{
	var ans = confirm("Do you really want to block this member?");

	if(ans == true)
	{
		pass_param = "change_block_status(\'"+disp_div+"\')";
		xmlhttpPost_makerequest('/z/block-unblock-member.php','action=Block&blocked_member_id='+escape(blocked_member_id)+"&disp_div="+escape(disp_div)+"&class_name="+class_name+"&page="+page,pass_param,3);
		
		hideToolTip();
	}
	
	
	return false;

}

function unblock_this_member(blocked_member_id,disp_div,class_name, page)
{
	pass_param = "change_block_status(\'"+disp_div+"\')";
	xmlhttpPost_makerequest('/z/block-unblock-member.php','action=Unblock&blocked_member_id='+escape(blocked_member_id)+"&disp_div="+escape(disp_div)+"&class_name="+class_name+"&page="+page,pass_param,3);

	hideToolTip();
	return false;
}

function change_block_status(handler)
{
	if(xmlHttpReq.readyState == 4) 
	{
		if(xmlHttpReq.status == 200)
		{
			/*str_arr = new Array();
			str_arr = xmlHttpReq.responseText.split("###");
			
			if(str_arr.length == 1)
			{
				document.getElementById(handler).innerHTML = str_arr[0];
			}
			else
			{
				document.getElementById(handler).innerHTML = str_arr[1];

				if(str_arr[0] == "block_exist")
				{
					alert("This user is already in your block list. The changes across all sections will be updated shortly.");
				}
				else if(str_arr[0] == "unblock_exist")
				{
					alert("This user is not in your Block List .The changes across all sections will be updated shortly.");
				}
			}*/



			document.getElementById(handler).innerHTML = xmlHttpReq.responseText;

		}
		else
		{
			alert("Error: While trying to fetch records, please try again later");
		}
	}
	else
	{
		document.getElementById(handler).innerHTML = "<img src=\"/zones-ssi/js-css-images/loading.gif\" border=\"0\" alt=\"Loading...\" align=\"absmiddle\">";
	}
}