// JavaScript Document

function mycenteralpopwinVHS(fname,width,height)
{
	var file
	var sWidth	= 200
	var sHeight = 200
	
	if(width.length > 0)
	{
		sWidth = width;
	}
	else
	{
		width =100;
	}
	
	if(height.length > 0)
	{
		sHeight = height;
	}
	else
	{
		height =100;
	}
	
	file = fname
	file =file	
	
	var wintop  =window.screen.height;
	var winleft =window.screen.width;
	wintop  =(wintop/2) - (height/2)
	winleft =(winleft/2) - (width/2)
		
	if ( sWidth > window.screen.availWidth )
		{ sWidth = window.screen.availWidth; }
	if (sHeight > window.screen.availHeight )
		{ sHeight = window.screen.availHeight; }
	if ( parseInt(sWidth) < width )
		{ sWidth = width; }
	if ( parseInt(sHeight) < height )
		{ sHeight = height; }
	if ((navigator.appName == "Microsoft Internet Explorer") || (navigator.appName == "Netscape") ) {
		myWindow=window.open(file, "_blank", "status=no, scrollbars=yes, toolbar=no, resizable=yes, location=no, menubar=no, top=" + wintop + ", left= "+ winleft +", height=" + sHeight + ", width=" + sWidth);
		myWindow.focus();
    }
	else if(navigator.userAgent.indexOf('Chrome') != -1) {
	 	window.open(file, "_blank", "toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=yes,resizable=no, top=" + wintop + ", left= "+ winleft +", height=" + sHeight + ", width=" + sWidth);
	}
    else
    {
        window.open(file, "_blank", "toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=yes,resizable=no, top=" + wintop + ", left= "+ winleft +", height=" + sHeight + ", width=" + sWidth);
    }
     //else if(navigator.appName == "Opera")
	 //{
//	 	window.open(file, "_blank", "toolbar=no, status=no, location=no, \n\
//                            menubar=no, directories=no, scrollbars=yes, resizable=no,\n\
//                            top=" + wintop + ", left= "+ winleft +", \n\
//                            height=" + sHeight + ", width=" + sWidth);
      //  alert(hi);

        //newWindow.focus();

	// }
	/*if ( navigator.appName == "Netscape" ) 
		{ 
		window.open(file,"_blank","scrollbars=yes,alwaysRaised,resizable=yes,dependant,innerheight=" + sHeight + ",innerwidth=" + sWidth); 		 
		//window.open(file,"_blank","alwaysRaised,dependant,scrollbars=yes,innerheight=" + sHeight + ",innerwidth=" + sWidth); 
		}*/
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		//Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
function popup(page_name,divname)
{	
	xmlHttp=GetXmlHttpObject();
	if(xmlHttp==null)
	{
		alert("Browser does not support HTTP Request");
		return;
	}
	var url=page_name;
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			document.getElementById(divname).innerHTML=	xmlHttp.responseText;	
			fireMyPopup(divname);
			
		}
		
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function popupmodule_submit(page_name,divname)
{	
	xmlHttp=GetXmlHttpObject();
	if(xmlHttp==null)
	{
		alert("Browser does not support HTTP Request");
		return;
	}
	var url=page_name;
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			document.getElementById(divname).innerHTML=	xmlHttp.responseText;	
			fireMyPopup(divname);
			
		}
		
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}



/*// is blank
	function isBlank(obj, msg) 
	{ 
		
		if(obj.value==null) 
		{ 
		return msg;
		//obj.focus(); 
		return false; 
		} 
		for(var i=0;i<obj.value.length;i++) 
		{ 
			if(obj.value.charAt(i) ==' ') 
				break; 
			if ((obj.value.charAt(i)!="\t")&&(obj.value.charAt(i)!="\n")&&(obj.value.charAt(i)!="\r")) 
				{ return ''; } 
		} 
			return msg;
			//obj.focus(); 
			//obj.select(); 
	}*/
	function validateAlphaNumeric(obj, msg)
	{
		var validStr = /^[a-zA-Z0-9\s]{1,}$/;
		if (validStr.test(obj.value) != false)
		{
			return '';
		}
		return msg;
	}

	<!-- Script by hscripts.com -->
	/*function alphanumeric(alphane,msg)
	{
		var numaric = alphane;
		for(var j=0; j<numaric.length; j++)
			{
			  var alphaa = numaric.charAt(j);
			  var hh = alphaa.charCodeAt(0);
			  if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123))
			  {
			  }
			else	{
				 return false;
			  }
			}
	 return msg;
	}*/
<!-- Script by hscripts.com -->

	
	function validateRadioCheck(fieldName, msg)
		{
			count = 0;
			var arr = document.getElementsByName(fieldName);
			var choice = false;
						
			if(fieldName == 'txt_engage_buss[]')
			{
				for(r=0;r<arr.length;r++)
				{
					if (arr[r].checked == true){
						count = count +1;
						choice = true;
					}
				}
				
				if (count < 1 )
					{
						//alert(msg);
						//arr[0].focus();
						return msg;
					}
					else
						return "";
			}
			else
			{
					for(r=0;r<arr.length;r++)
					{
						if (arr[r].checked == true)
						choice = true;
					}
					
					if (!choice)
					{
						//alert(msg);
						//arr[0].focus();
						return msg;
					}else
					return "";
			}
			
			
		}
		
		function validateEmail(obj, msg)
		{
			var emailStr = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;
			if (emailStr.test(obj.value) == false)
			{
				
				//obj.focus();
				//obj.select();
				return msg;
			}
			return "";
		}
		
	
		
		function goInsertMeta()
		{
			var selKey = "";
			var frmElement	= document.frmMeta['chMeta[]'];
			
			if(frmElement.length)
			{
				for(k=0;k<frmElement.length;k++)
				{
					if(frmElement[k].checked == true)
					{
						selKey  = selKey + frmElement[k].value + ",";
					}
				}
				
				selKey = document.getElementById("txtMetaKey").value + selKey;
				document.getElementById("txtMetaKey").value = selKey;
				fadeOutMyPopup('styled_popup');
			}
			else
			{
				frmElement = document.getElementById('chMeta[]');
				if(frmElement.checked == true)
				{
					selKey = frmElement.value;
					selKey = document.getElementById("txtMetaKey").value + selKey;
					document.getElementById("txtMetaKey").value = selKey;
					fadeOutMyPopup('styled_popup');
				}
			}
			
		}//fun
		function getMultiple(ob) 
		{ 
			
			var opts = document.getElementById("selKeywords").options;
			var selVals = "";
			for(var i=0; i<opts.length;i++)
			{
				if(opts[i].selected && opts[i].value != '')
				{
					selVals += opts[i].value + ",";
				}//if
			}//for
			if(selVals.length > 0 )
			{
				popup('admin_meta_keywords.php?arIds='+selVals,'styled_popup');
			}
		}//fun
		
			function getMultipleKeywords(ob) 
		{ 
			
			var opts = document.getElementById("selKeywords").options;
			var selVals = "";
			for(var i=0; i<opts.length;i++)
			{
				if(opts[i].selected && opts[i].value != '')
				{
					selVals += opts[i].value + ",";
				}//if
			}//for
			if(selVals.length > 0 )
			{
				popup('meta_keywords.php?arIds='+selVals,'styled_popup');
			}
		}//fun
		
function textCounter(field,cntfield,maxlimit,divname)
{
	
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
		alert(maxlimit + " character limit is overflow");	
		document.getElementById(divname).innerHTML	=  maxlimit + " character limit is overflow.";
	}
	else
	{
		cntfield.value = maxlimit - field.value.length;
		
		if(cntfield.value == 0 ) {
			//alert(maxlimit + " character limit is overflow");
			document.getElementById(divname).innerHTML	=  maxlimit + " character limit is overflow.";
		}
		else
			document.getElementById(divname).innerHTML = '';	  	
	}
}

function chk_blank_char_limit(field,frmvalue,msg,divname,enter_select,count_field,limitchar,divMax)
{
	
	chkBlank(frmvalue,msg,divname,enter_select);
	
	if(frmvalue!='')
	{
		textCounter(field,count_field,limitchar,divMax);
	}else
	{
		document.getElementById(divMax).innerHTML = '';
		count_field.value = parseInt(limitchar) ;
	}
}


function LTrim( value ) {
     	var re = /\s*((\S+\s*)*)/;
   	return value.replace(re, "$1");
    	
}
    
    // Removes ending whitespaces
function RTrim( value ) {
	
var re = /((\s*\S+)*)\s*/;
return value.replace(re, "$1");

}

function trim(value)
{
	var str	= RTrim(LTrim( value ));
	return str;
}

function chkBlank(txtVal,msg,divname,selEnter) 
{
	
	//var frm_hid_fld_name=eval(hid_fld_name);
	val	= txtVal;
	
	val = val.replace(/^\s+/, '');
	val.replace(/\s+$/, '');
	//alert(val.length);
	if(val.length == 0 ) 
	{ 
		document.getElementById(divname).innerHTML="Please "+selEnter+" "+msg;
		document.getElementById(divname).style.display="block";
		return false;
		//frm_hid_fld_name.value="N";
		//document.getElementById('Submit').disabled=true;
	}
	else
	{
		
		document.getElementById(divname).innerHTML= "";
		document.getElementById(divname).style.display="none";
		return true;
	//	document.getElementById('Submit').disabled=false;
		//frm_hid_fld_name.value="Y";

	}
}
	
function fill_subcat(dropdown)
{
	if(dropdown.value == 0 || dropdown.value == '')
	{
		return false;
	}
	xmlHttp=GetXmlHttpObject();
	if(xmlHttp==null)
	{
		alert("Browser does not support HTTP Request");
		return;
	}
	var url="fill_dropdown.php?pname="+dropdown.name+"&pvalue="+dropdown.value;
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			var d=document.getElementById('div_'+dropdown.name+"_1");
			if(d != null)
			{
				document.getElementById(''+dropdown.name+"_1").innerHTML = xmlHttp.responseText;
				var str	= xmlHttp.responseText;
				//alert(str.length);
				if(str.length > 1)
				{
					document.getElementById('div_'+dropdown.name+"_1").style.display = 'block';
				}
				else
				{
					document.getElementById('div_'+dropdown.name+"_1").style.display = 'none';
				}
			}
			
		}
		
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}	

function CheckIsIE()
	{
		if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') 
		{ return true;}
		else { return false; }
	}
	 

function printtxt()
{
	if (CheckIsIE() == true)
		{
			document.frmprint.focus();
			document.frmprint.print();
		}
		else
		{
			
		window.frames['frmprint'].focus();
		window.frames['frmprint'].print();
		}
	
}


// Abuse report 

function report_abuse(content_ref_id,content_posted_by_id,abuse_by,content_type)
{
	var msg				= "";
	var success_msg		= "";
	var already_msg		= "";
	if(content_type == "BL")
	{
		msg				= "Do you really wish to report this blog abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this blog has already been sent to the Administrator";
	}
	else if(content_type == "CBL")
	{
		msg				= "Do you really wish to report this club blog abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this club blog has already been sent to the Administrator";
	}
	else if(content_type == "FT")
	{
		msg				= "Do you really wish to report this forum topic abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this forum topic has already been sent to the Administrator";
	}
	else if(content_type == "FR")
	{
		msg				= "Do you really wish to report this topic reply abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this topic reply has already been sent to the Administrator";
	}
	else if(content_type == "BKC")
	{
		msg				= "Do you really wish to report this book comment abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this book comment has already been sent to the Administrator";
	}
	else if(content_type == "CFT")
	{
		msg				= "Do you really wish to report this forum topic abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this forum topic comment has already been sent to the Administrator.";
	}
	else if(content_type == "CFR")
	{
		msg				= "Do you really wish to report this topic reply abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this topic reply has already been sent to the Administrator.";
	}
	else if(content_type == "BC")
	{
		msg				= "Do you really wish to report this blog comment abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this blog comment has already been sent to the Administrator.";
	}
	else if(content_type == "CBC")
	{
		msg				= "Do you really wish to report this club blog comment abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this club blog has already been sent to the Administrator.";
	}
	else if(content_type == "CBL")
	{
		msg				= "Do you really wish to report this blog abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this blog has already been sent to the Administrator.";
	}
	else
	{
		msg				= "Do you really wish to report this document abuse to the Administrator?";
		success_msg		= "";
		already_msg		= "Abuse report for this document has already been sent to the Administrator.";
	}
	
	if(confirm(msg))
	{
		
		xmlHttp=GetXmlHttpObject();
		if(xmlHttp==null)
		{
			alert("Browser does not support HTTP Request");
			return false;
		}
		var url='http://www.bookchums.com/forum/make_abuse.php?content_id='+content_ref_id+'&content_posted_by_id='+content_posted_by_id+'&abuse_by='+abuse_by+'&content_type='+content_type;
		//var url='http://www.engagebooks.com/forum/make_abuse.php?content_id='+content_ref_id+'&content_posted_by_id='+content_posted_by_id+'&abuse_by='+abuse_by+'&content_type='+content_type;
                //var url='http://localhost/bookchums/forum/make_abuse.php?content_id='+content_ref_id+'&content_posted_by_id='+content_posted_by_id+'&abuse_by='+abuse_by+'&content_type='+content_type;
		xmlHttp.onreadystatechange = function()
		{ 
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				if(xmlHttp.responseText == 0)
				{
					alert("Abuse report has been posted successfully to administrator123.");
				}
				else
				{
					alert(already_msg);
				}
			}
		}
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	else
	{
		return false;
	}	
}

function addfollower(blogid,action,dvName,msg,userid,clubid)
{ 
	document.frmBlogDetails.txt_action.value 	= action
	document.frmBlogDetails.blogId.value 		= blogid; 
	document.frmBlogDetails.user_id.value 		= userid;
	if(clubid != "")
	{
		document.frmBlogDetails.clubId.value 		= clubid; 
	}
	
	if(action == "addfollower")
	{
		if(confirm(msg))
		{
			//alert(dvName);
			doForm(dvName);
			call_ajax_file(dvName,'http://www.bookchums.com/add_follower.php');
		}
	}
	else
	{
		//alert(dvName);
		if(confirm(msg))
		{	
			doForm(dvName);
			call_ajax_file(dvName,'http://www.bookchums.com/add_follower.php');
		}	
	}
}

function call_search(char)
{
	if(document.getElementById("r_buddies1").checked || document.getElementById("r_buddies2").checked || document.getElementById("r_buddies3").checked 
	   || document.getElementById("r_buddies4").checked )
	{
		if(document.getElementById("r_buddies1").checked)
		{
			var searchType				= document.getElementById("r_buddies1").value;
			window.location.href		= 'books-i-want-search-result.php?char='+char+"&type="+searchType;
		}//if r_buddies1
	}//if
	else
	{
		alert('Please pick the choice.');
	}
}//fun


function addfollowerblog(blogid,action,dvName,msg,userid)
{ 
	document.frmBlogDetails.txt_action.value 				= action
	document.frmBlogDetails.blogId.value 					= blogid; 
	document.frmBlogDetails.user_id.value 					= userid;
	
	if(action == "addfollower")
	{
		if(confirm(msg))
		{
			//alert(dvName);
			doForm(dvName);
			call_ajax_file(dvName,'http://www.bookchums.com/add_follower.php');
		}
	}
	else
	{
		if(confirm(msg))
		{	
			doForm(dvName);
			call_ajax_file(dvName,'http://www.bookchums.com/add_follower.php');
		}	
	}
}

//------- Stars --------to subscribe the link

function subscribeLink(blogid,action,dvName,msg,emailId)
{
	document.frmBlogDetails.txt_action.value = action
	document.frmBlogDetails.blogId.value = blogid; 
	document.frmBlogDetails.emailId.value = emailId; 
	if(action == "subscribe_link")
		{
			if(confirm(msg))
			{
				xmlHttp=GetXmlHttpObject();
				if(xmlHttp==null)
				{
					alert("Browser does not support HTTP Request");
					return false;
				}
				var url='http://www.bookchums.com/subscribe.php?blogId='+blogid+'&emailId='+emailId;
				//var url='http://www.engagebooks.com/subscribe.php?blogId='+blogid+'&emailId='+emailId;
				xmlHttp.onreadystatechange = function()
				{ 
					if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
					{
						if(xmlHttp.responseText == 0)
						{
							alert("Link has been sent successfully.");
						}
						else
						{
							alert("Link has been sent successfully");
						}
					}
				}
				xmlHttp.open("GET",url,true)
				xmlHttp.send(null)
			}
		}
		else
		{
			return false;
		}
}

//------- Ends ---------to subscribe the link



// added for inc_books_review.php page
function showpan(divname)
{
  
			if(divname=='popular')
			{
				var url="page_include/ajax_mostreview.php";
				var exist = func_ajax(url);
				if(exist)
				{
				document.getElementById('div2').style.display='block';
				document.getElementById('div2').innerHTML=exist;
				document.getElementById('div1').style.display='none';
				document.getElementById('div3').style.display='none';
				
				document.getElementById('most_popular_books_btn_container_mp').className='latest_added_books_btn_container fleft';
				document.getElementById('most_popular_books_btn_bg_left_mp').className='latest_added_books_btn_bg_left fleft';
				document.getElementById('most_popular_books_btn_bg_mid_mp').className='latest_added_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_text fleft';
				document.getElementById('most_popular_books_btn_bg_right_mp').className='latest_added_books_btn_bg_right fleft';
				
				document.getElementById('latest_added_books_btn_container_lr').className='most_popular_books_btn_container fleft';
				document.getElementById('latest_added_books_btn_bg_left_lr').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('latest_added_books_btn_bg_mid_lr').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_text_lr').className='left_part_header_black_text fleft';
				document.getElementById('latest_added_books_btn_bg_right_lr').className='most_popular_books_btn_bg_right fleft';
				
				document.getElementById('featured_reviews_btn_container_mp').className='most_popular_books_btn_container fleft';
				document.getElementById('featured_reviews_btn_bg_left_mp').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('featured_reviews_btn_bg_mid_mp').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_black_text fleft';
				document.getElementById('featured_reviews_btn_bg_right_mp').className='most_popular_books_btn_bg_right fleft';
				
				}
			}
			else if(divname=='featured')
			{
				var url="page_include/home_featuredreview.php";
				var exist = func_ajax(url);
				if(exist)
				{
				document.getElementById('div3').style.display='block';
				document.getElementById('div3').innerHTML=exist;
				document.getElementById('div1').style.display='none';
				document.getElementById('div2').style.display='none';
				
				
				document.getElementById('featured_reviews_btn_container_mp').className='latest_added_books_btn_container fleft';
				document.getElementById('featured_reviews_btn_bg_left_mp').className='latest_added_books_btn_bg_left fleft';
				document.getElementById('featured_reviews_btn_bg_mid_mp').className='latest_added_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_text fleft';
				document.getElementById('featured_reviews_btn_bg_right_mp').className='latest_added_books_btn_bg_right fleft';
				
				
				document.getElementById('most_popular_books_btn_container_mp').className='most_popular_books_btn_container fleft';
				document.getElementById('most_popular_books_btn_bg_left_mp').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('most_popular_books_btn_bg_mid_mp').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_black_text fleft';
				document.getElementById('most_popular_books_btn_bg_right_mp').className='most_popular_books_btn_bg_right fleft';
				
				document.getElementById('latest_added_books_btn_container_lr').className='most_popular_books_btn_container fleft';
				document.getElementById('latest_added_books_btn_bg_left_lr').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('latest_added_books_btn_bg_mid_lr').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_text_lr').className='left_part_header_black_text fleft';
				document.getElementById('latest_added_books_btn_bg_right_lr').className='most_popular_books_btn_bg_right fleft';
				
				}
			}
			else {
				document.getElementById('div2').style.display='none';
				document.getElementById('div1').style.display='block';
				document.getElementById('div3').style.display='none';
				document.getElementById('latest_added_books_btn_container_lr').className='latest_added_books_btn_container fleft';
				document.getElementById('latest_added_books_btn_bg_left_lr').className='latest_added_books_btn_bg_left fleft';
				document.getElementById('latest_added_books_btn_bg_mid_lr').className='latest_added_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_text_lr').className='left_part_header_text fleft';
				document.getElementById('latest_added_books_btn_bg_right_lr').className='latest_added_books_btn_bg_right fleft';
				
				document.getElementById('most_popular_books_btn_container_mp').className='most_popular_books_btn_container fleft';
				document.getElementById('most_popular_books_btn_bg_left_mp').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('most_popular_books_btn_bg_mid_mp').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_black_text fleft';
				document.getElementById('most_popular_books_btn_bg_right_mp').className='most_popular_books_btn_bg_right fleft';
				
				document.getElementById('featured_reviews_btn_container_mp').className='most_popular_books_btn_container fleft';
				document.getElementById('featured_reviews_btn_bg_left_mp').className='most_popular_books_btn_bg_left fleft';
				document.getElementById('featured_reviews_btn_bg_mid_mp').className='most_popular_books_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text_mp').className='left_part_header_black_text fleft';
				document.getElementById('featured_reviews_btn_bg_right_mp').className='most_popular_books_btn_bg_right fleft';
			
			}	
			//alert(exist);
	
}

// added for inc_latest_club.php page
function showclub(divname)
{
  
			if(divname=='most_popular')
			{
				var url="page_include/ajax_latestclub.php";
				var exist = func_ajax(url);
				if(exist)
				{
				document.getElementById('div4').style.display='block';
				document.getElementById('div4').innerHTML=exist;
				document.getElementById('div3').style.display='none';
				
				document.getElementById('most_popular_clubs_btn_container').className='latest_added_clubs_btn_container fleft';
				document.getElementById('most_popular_clubs_btn_bg_left').className='featured_book_club_pics_header_bg_left fleft';
				document.getElementById('most_popular_clubs_btn_bg_mid').className='featured_book_club_pics_header_bg_mid_2 fleft';
				document.getElementById('left_part_header_black_text').className='left_part_header_text';
				document.getElementById('most_popular_clubs_btn_bg_right').className='featured_book_club_pics_header_bg_right fleft';
				
				document.getElementById('latest_added_clubs_btn_container').className='most_popular_clubs_btn_container fleft';
				document.getElementById('featured_book_club_pics_header_bg_left').className='most_popular_clubs_btn_bg_left fleft';
				document.getElementById('featured_book_club_pics_header_bg_mid_2').className='most_popular_clubs_btn_bg_mid fleft';
				document.getElementById('left_part_header_text').className='left_part_header_black_text';
				document.getElementById('featured_book_club_pics_header_bg_right').className='most_popular_clubs_btn_bg_right fleft';
				
				}
			}
			else {
			document.getElementById('div4').style.display='none';
			document.getElementById('div3').style.display='block';
			
				document.getElementById('latest_added_clubs_btn_container').className='latest_added_clubs_btn_container fleft';
				document.getElementById('featured_book_club_pics_header_bg_left').className='featured_book_club_pics_header_bg_left fleft';
				document.getElementById('featured_book_club_pics_header_bg_mid_2').className='featured_book_club_pics_header_bg_mid_2 fleft';
				document.getElementById('left_part_header_text').className='left_part_header_text';
				document.getElementById('featured_book_club_pics_header_bg_right').className='featured_book_club_pics_header_bg_right fleft' ;
				
				document.getElementById('most_popular_clubs_btn_container').className='most_popular_clubs_btn_container fleft';
				document.getElementById('most_popular_clubs_btn_bg_left').className='most_popular_clubs_btn_bg_left fleft';
				document.getElementById('most_popular_clubs_btn_bg_mid').className='most_popular_clubs_btn_bg_mid fleft';
				document.getElementById('left_part_header_black_text').className='left_part_header_black_text';
				document.getElementById('most_popular_clubs_btn_bg_right').className='most_popular_clubs_btn_bg_right fleft';
				
			}	
			//alert(exist);
	
}




