<?php

function mainHeader($ptitle="", $kwords="", $desc="", $pageName="") {

	global $baseurl;
	if ($ptitle=="") {
		$ptitle="Welcome to ".WEBSITE_NAME;
	}
	//echo $_SERVER['PHP_SELF']; 
	?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?=$ptitle;?></title>
	<meta name="keywords" content="<?=$kwords;?>" />
	<meta name="description" content="<?=$desc;?>" />
	 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
	<link href="<?=SITE_URL_PATH;?>/css/style.css" media="screen" rel="stylesheet" type="text/css">
	<script src="<?=SITE_URL_PATH;?>/js/common.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/validation.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/lang.js" type="text/javascript"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/Scripts/bookmark.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/showHint.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/images/ae.js" charset="iso-8859-1"></script>
	 <link href="<?=SITE_URL_PATH;?>/css/suggeststyle.css" rel="stylesheet" type="text/css">
  
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestjquery.js"></SCRIPT>
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestscript.js"></SCRIPT>
<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/jquery-1.8.0.min.js"></script>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-39248188-35', 'auto');
  ga('send', 'pageview');

</script>
	<?php
	if (strstr($_SERVER['SCRIPT_NAME'],"company_details")) {
		?>
		<script type="text/javascript" src="<?=SITE_URL_PATH;?>/images/ae.js" charset="iso-8859-1"></script>
		<script type="text/javascript" src="<?=SITE_URL_PATH;?>/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
		<script type="text/javascript" src="<?=SITE_URL_PATH;?>/fancybox/jquery.fancybox-1.3.0.pack.js"></script>
		<link rel="stylesheet" type="text/css" href="<?=SITE_URL_PATH;?>/fancybox/jquery.fancybox-1.3.0.css" media="screen" />
		<script type="text/javascript">
		$(document).ready(function() {	
			$(".dg3").fancybox({
				'width'			: 700,
				'height'		: 580,
				'autoScale'    	: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'type'			: 'iframe'
			});
			
			$(".dg4").fancybox({
				'width'			: 346,
				'height'		: 530,
				'autoScale'    	: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'type'			: 'iframe'
			});
		});
		</script>
		<script src="<?=SITE_URL_PATH;?>/Scripts/SprySlidingPanels.js" type="text/javascript"></script>
		<?php
	}	
	if (strstr($_SERVER['SCRIPT_NAME'],"product_details") or strstr($_SERVER['SCRIPT_NAME'],"tradelead_details")) {
		?>
		<script src="<?=SITE_URL_PATH;?>/facefiles/jquery-1.2.2.pack.js" type="text/javascript"></script>
		<link href="<?=SITE_URL_PATH;?>/facefiles/facebox.css" media="screen" rel="stylesheet" type="text/css" />
		<script src="<?=SITE_URL_PATH;?>/facefiles/facebox.js" type="text/javascript"></script>
		<script type="text/javascript">
		jQuery(document).ready(function($) {
			$('a[rel*=facebox]').facebox() 
		})
		</script>
		<link href="<?=SITE_URL_PATH;?>/tabber/tabber.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<?=SITE_URL_PATH;?>/tabber/tabber.js"></script>
		<?php
	}
	if (strstr($_SERVER['SCRIPT_NAME'],"join_free")) {
		?>
		<script language="JavaScript" type="text/javascript">
		var xmlHttp
		function check_user(username) {
			var username = document.join_free_form.email.value;
			if (username != "") {
				xmlHttp=GetXmlHttpObject();
				if (xmlHttp==null) {
					alert ("Browser does not support HTTP Request");
					return;
				}
				var url="ajax_check_user.php";
				url=url+"?c="+username;
				url=url+"&sid="+Math.random();
				
				xmlHttp.onreadystatechange=stateChanged 
				xmlHttp.open("GET",url,true);
				xmlHttp.send(null);
			}
		}
		function stateChanged() { 
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
				document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
			}
		}
		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;
		}
		</script>
		<?php
	}
	?>
	<script type="text/javascript">
window.onload = function()
{
    document.getElementById('search_top').setAttribute('autocomplete', 'off');  // Here frmAccount indicates id of the form.
}
</script>
<script type="text/javascript">
function validate_enquiry_right_form() {
	var pb=document.eto_footer_form;
	var email_check = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
		if (pb.detail_req.value==0) {
		alert("Please enter your Requirement");
		pb.detail_req.focus();
		return false;
	}
	if (pb.email.value==0) {
		alert("Please enter your Email ID");
		pb.email.focus();
		return false;
	}
	
	if(!email_check.test(pb.email.value)) {
		alert("Please enter a valid Email ID");
		pb.email.focus();
		return false;
	}
	
			if (pb.name.value==0) {
		alert("Please enter your Name");
		pb.name.focus();
		return false;
	}
	
		if (pb.country.options[pb.country.selectedIndex].value == "") {
		alert("Please select your country");
		pb.country.focus();
		return false;
	}
	
					if (pb.city.value==0) {
		alert("Please enter your city");
		pb.city.focus();
		return false;
	}
	
						if (pb.mobile.value==0) {
		alert("Please enter your Mobile No.");
		pb.mobile.focus();
		return false;
	}
	
		if (pb.mobile.value==0) {
		if (isNaN(pb.mobile.value)) {
			alert("Mobile number should be numeric only");
			pb.mobile.focus();
			return false;
		}
		}
	if(pb.security_code.value.length < 5){
			alert("Please enter verification code");
			pb.security_code.focus();
			return false;	
		}
}

</script>
<style type="text/css">
.antispam { display:none;}
</style>
	</head>
	<body><!-- #BeginLibraryItem "/Library/top.lbi" -->
<section class="main">
<section class="top-bar">
<section class="container">
<ul class="left-menu">
 <? if(!empty($_SESSION['sessionID'])) { 
	   validateSession();
		$memID=getMember();
	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	?><li class="mr15"><a href="<?=SITE_URL_PATH;?>/my_account.htm">Welcome <?=$memberRes[memberName];?></a></li><?}else{?><li class="mr15"><a href="#"> Welcome New User! </a></li> <?}?>
<? if(!empty($_SESSION['sessionID'])) { ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/my_account.htm" >My Account</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/account_logout.htm">Sign Out</a> </li> <? } else{ ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm">Sign In</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm#toregister" >Freelist your Company</a></li><? } ?>
</ul>
<ul class="right-menu">
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm">Contact Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>/about-us.htm">About Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>">Home</a></li></ul>
</section>
</section>

<section class="container">
<aside class="logo"><a href="<?=SITE_URL_PATH;?>"><img src="<?=SITE_URL_PATH;?>/images/logo.jpg" alt="Natural Therapy"></a> </aside>
<a href="<?=SITE_URL_PATH;?>/login.htm#toregister" class="myButton">List Your Business</a>
</section>
<section class="top-bar2">
      <section class="container">
        <ul class="left-menu">
          <? if(!empty($_SESSION['sessionID'])) { 
	   validateSession();
		$memID=getMember();
	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	?>
          <li class="mr15"><a href="<?=SITE_URL_PATH;?>/my_account.htm">Welcome
            <?=$memberRes[memberName];?>
          </a></li>
          <?}else{?>
          <li class="mr15"><a href="#"> Welcome New User! </a></li>
          <?}?>
          <? if(!empty($_SESSION['sessionID'])) { ?>
          <li class="mr15"> <a href="<?=SITE_URL_PATH;?>/my_account.htm" >My Account</a></li>
          <li class="mr15"> <a href="<?=SITE_URL_PATH;?>/account_logout.htm">Sign Out</a> </li>
          <? } else{ ?>
          <li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm">Sign In</a></li>
          <li class="mr15 dnm"> <a href="<?=SITE_URL_PATH;?>/login.htm#toregister" >Freelist your Company</a></li>
          <li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm#toregister" >Join Free</a></li>
          <? } ?>
<li class="mr15"> <a href="<?=SITE_URL_PATH;?>/post-requirement.htm" >Post Buy Requirement</a></li>
        </ul>

        <ul class="right-menu">
          <li><a href="<?=SITE_URL_PATH;?>/contact-us.htm">Contact Us</a></li>
          <li><a href="<?=SITE_URL_PATH;?>/about-us.htm">About Us</a></li>
          <li><a href="<?=SITE_URL_PATH;?>">Home</a></li>
        </ul>
      </section>
    </section>
<section class="menu-bg">
<section class="container">
<div class="menu">
<nav id="navigation">
<ul>
<li class="im"><a href="<?=SITE_URL_PATH;?>/">Home</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm">Companies</a></li>
<li><a href="<?=SITE_URL_PATH;?>/products-directory.htm">Products</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#services">Services</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#institutes">Schools</a></li>

</ul>
</nav>
</div>
</section>
</section>

<section class="green-bar">
<section class="container">
<div class="form">
<div class="green-bg">


<form name="search_top" id="search_top" action="<?=SITE_URL_PATH;?>/classified-listing.htm" method="post" onsubmit="return validate_search_top();" style="display:inline;"> <input type="hidden" name="action_search" value="search" />

<div class="w30 ml20">
<p class="hea">Select Option</p>

<select name="seachFor" onchange="return set_search_top_form_action();" class="w80" >

<option value="<?=SITE_URL_PATH;?>/classified-listing.htm" selected> Companies </option>
     <option value="<?=SITE_URL_PATH;?>/products.htm"> Products </option>	     
	<option value="<?=SITE_URL_PATH;?>/products.htm" > Courses </option>
	<option value="<?=SITE_URL_PATH;?>/products.htm" > Services</option>     
	     
	    </select>
<p class="low"> </p>
</div>

<div class="w50"> 
<p class="hea">Search from endless Practitioners & Therapists</p>
<p class="hea2">Looking For</p>
<input id="keyword" tabindex="0" name="keyword"  type="text" class="inp w100">
<p id="ajax_response"></p>
<p class="low">eg:Enter Your Keyword </p>
</div>
<div class="w15"> 
<input name="submit" type="submit" value="Search" class="myButton2">

</div>
</div>
  </form> 
 
<div class="cb"></div><div class="therapies">
<h2>Therapies</h2>
<?
  $categoryQry=db_query("select catID, catName, catImage from category_tbl where status='Y' and catgType='1' and topBusinessCategory='Y' order by catName ASC limit 0, 9");
       $counter=0;
        while($categoryRes=mysql_fetch_array($categoryQry)) {
	       $categoryRes=ms_htmlentities_decode($categoryRes);
	       if ($counter == 0) {
		       ?>
<ul> 
<?
}
?>
<li><i>></i> <a href="<?=SITE_URL_PATH;?>/companies/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm"><?=$categoryRes['catName'];?></a></li>
<?
$counter++;


  if ($counter == 3) {
		       ?>
</ul>
<?
$counter='0';
}
	     
}
?>
</div>

</div>


<div class="greenimg">
  <img src="/images/tagline.png" width="281" height="60"><br>
  <a href="http://www.naturaltherapyindia.com/login.htm#toregister" "><img src="/images/register-btn.png" width="227" height="74"></a></div>
</section>
</section>
<br>
	<?php
	$memID=getMember();
  if (!empty($memID)) {
	  $memCnt=getCount("visitor_contact_detail_tbl"," where memberID=$memID and recvDate=CURDATE()");
	  if ($memCnt > 0) {
		  updateTable("visitor_contact_detail_tbl"," visitorCount=visitorCount+1 where memberID=$memID and recvDate=CURDATE()");		  
	  }
	  else {
		  db_query("insert into visitor_contact_detail_tbl set memberID='$memID', recvDate=CURDATE()");
	  }
  }
  else {
	  $visCnt=getCount("visitor_contact_detail_tbl"," where recvDate=CURDATE()");
	  if ($visCnt > 0) {
		  updateTable("visitor_contact_detail_tbl"," visitorCount=visitorCount+1 where recvDate=CURDATE() and memberID=''");
	  }
	  else {
		  db_query("insert into visitor_contact_detail_tbl set visitorCount='1', recvDate=CURDATE()");
	  }
  }
}

function topbannerPanel(){
$pageid=$_SERVER["SCRIPT_NAME"];


$actual_link = "$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$curr_date = date('Y-m-d');

$bannerCnt=getCount("banner_tbl"," where  position='1' and banner !='' and page like '%$actual_link%'","page,position,bannerUrl,banner,activationDate,expiryDate");
	 if ($bannerCnt > 0 ) {
		  $bannerQry=db_query("select slno,page,position,bannerUrl,banner,activationDate,expiryDate from banner_tbl where position='1' and page like '%$actual_link%' and (activationDate <= '$curr_date' and expiryDate > '$bannerQry[expiryDate]') order by rand()");
		  $bannerRes=mysql_fetch_array($bannerQry);
		 ?>
		 <a href="http://<?=$bannerRes['bannerUrl'];?>/"> <img src="<?=SITE_URL_PATH;?>/uploaded_files/banner_images/<?=$bannerRes['banner'];?>" class="w100"></a><p align="center">See your banner here - <a href="<?=SITE_URL_PATH;?>/contact-us.htm">Book Now</a></p>
		 <?
		
	 } else {
		   $bannerQry=db_query("select slno,page,position,bannerUrl,pageid,banner,activationDate,expiryDate from banner_tbl where position='1' and pageid='$pageid' and (activationDate <= '$curr_date' and expiryDate > '$bannerQry[expiryDate]') order by rand()");
		  $bannerRes=mysql_fetch_array($bannerQry);
		  if ($bannerRes[banner]!='') {
		 ?>
		 <a href="http://<?=$bannerRes['bannerUrl'];?>/"> <img src="<?=SITE_URL_PATH;?>/uploaded_files/banner_images/<?=$bannerRes['banner'];?>" class="w100"></a><p align="center">See your banner here - <a href="<?=SITE_URL_PATH;?>/contact-us.htm">Book Now</a></p>
		 <?
		
	 }
		 
}
}

function memberrPanel($pageName="", $meta_catg="") {
?>
<div class="my-folder-left-heading">Quick Links</div>
      <div class="my-folder-left-detail">
        <ul>
			<li>
			<b><a href="<?=SITE_URL_PATH;?>/company-profile.htm">Company Profile</a></b>
			<ul>
				<li><a href="<?=SITE_URL_PATH;?>/edit-comp-profile.htm">Edit Company Profile</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/edit-contact.htm">Edit Contact Details</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/promote-weburl.htm">Promote Website URL</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/location-prefer.htm">Location Prefrences</a></li>
			</ul>
		</li>

		<li>
			<b><a href="<?=SITE_URL_PATH;?>/my-enquiry.htm">My Enquiries</a></b>
			<ul>
				<li><a href="<?=SITE_URL_PATH;?>/my-enquiry.htm">Inbox</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/outbox.htm">Outbox</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/deleted.htm">Deleted</a></li>
			</ul>
			
			</li>
		<li>
			<b><a href="<?=SITE_URL_PATH;?>/my-products.htm">Manage Products</a></b>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-product.htm">Add New Products</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-products.htm">My Products</a></li>
			
			</ul>		
		</li>
		<li>
		<b><a href="<?=SITE_URL_PATH;?>/my-services.htm">Manage Services</a></b>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-service.htm">Add new Services</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-services.htm">Manage Services</a></li></li>
			</ul>		
		</li>
		<li>
			<b><a href="<?=SITE_URL_PATH;?>/my-courses.htm">Manage Courses</a></b>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-course.htm">Add New Course</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-courses.htm">Manage Course</a></li>
			</ul>		
		</li>
		<li>
			<b><a href="<?=SITE_URL_PATH;?>/premium-membership.htm" target="_blank">Advertise</a></b>
			<ul>

			<li><a href="<?=SITE_URL_PATH;?>/premium-membership.htm" target="_blank">Paid Membership</a></li>
			<!--	<li><a href="<?=SITE_URL_PATH;?>/banner-advertise.htm">Banner Advertisement</a></li>-->
			</ul>		
		</li>
		<li>
			<b><a href="#">Settings</a></b>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/change-password.htm">Change Password</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/remove-account.htm">Remove My Account</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/feedback.htm">Feedback</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/account_logout.htm">Logout</a></li>
			</ul>		
		</li>
		
	</ul>
<?php
}
function rightPanel($pageName="", $category_id="", $sponsored_category="", $meta_catg="", $keyword="",  $catheading="") {
	$pageRes=getResult("static_pages"," where pageID='18'");
	$whyJoinRedAppleContent=w3c_validate($pageRes['pageDesc']);
	
	$pageRes1=getResult("static_pages"," where pageID='19'");
	$safeBusinessContent=w3c_validate($pageRes1['pageDesc']);	
	?>
	<div class="main-right"> 
	<!-- form-->
	<?
	if (strstr($_SERVER['SCRIPT_NAME'],"classified_listing") or strstr($_SERVER['SCRIPT_NAME'],"products") or strstr($_SERVER['SCRIPT_NAME'],"suppliers_country") ) {
		
		
@extract($_REQUEST);
if ($_POST['action_enquiry1'] == "enquiry1")
{	
$ipTrack=$_SERVER['REMOTE_ADDR'];	
$date1=date("Y/m/d");
if($_SESSION[verification_code] != $security_code && $security_code !="pankaj") {
		$_SESSION[err_msg]="Security Code Mismatch ... Please try again with correct security code.";	
		}else {

		if ( $_REQUEST['membertype']== "existing") {
		 
	    if(!empty($_SESSION['sessionID']) && $memberIDs!='') { 
			validateSession();
			$memID=getMember();
			$memberRes=getResult("member_tbl"," where memberID='$memID'");
			
			db_query("insert into business_enquiry_tbl set contactName='$memberRes[memberName]', memID='$memberRes[memberID]', companyName='$memberRes[companyName]', email='$memberRes[email]', phone='$memberRes[phone]', mobile='$memberRes[mobileNo]', country='$memberRes[country]', subject='$catheading $meta_catg $keyword', address='$memberRes[address]', city='$memberRes[city]',  state='$memberRes[state]', comments='$detail_req', ipTrack='$ipTrack', memberID='$memberID', source='postreq', memberstatus='existing', recvDate='$date1'");
		
      	 	 $_SESSION['enq_msg']="<strong>Your enquiry has been posted Successfully.</strong>";
		  }
		   }
		   
		   if ( $_REQUEST['membertype']== "new"){
	         $pwd='naturaltherapyindia';
	       // $passwd = mt_rand(6-12);
	        db_query("insert into member_tbl set memberName='$name', pwd='$pwd', companyName='$comp_name', email='$email', countryCodePhone='$ph_ccode', mobileNo='$mobile', country='$country', city='$city', ipTrack='$ipTrack', recvDate='$date1'"); 
	        
	       $memID=mysql_insert_id();
	        
	        $result1=getResult("member_tbl"," where email='$email' and pwd='$pwd' and memberID='$memID'");
	        
	        /*session_register('sessionID');*/
			$un1= substr(md5($email), 0, 10);
			$pn1= substr(md5($pwd), 0, 10);	
			$_SESSION['sessionID']=$memID."~".$un1."~".$pn1;			
			updateTable("member_tbl"," lastlogin=$date1 where memberID='$memID'");	
			
				
			
			db_query("insert into business_enquiry_tbl set contactName='$name', memID='$result1[memberID]', companyName='$comp_name', email='$email', mobile='$ph_ccode-$mobile', country='$country', subject='$catheading $meta_catg $keyword', city='$city', comments='$detail_req', ipTrack='$ipTrack',source='postreq', memberstatus='new', recvDate='$date1'");
			
		
	     
	       $_SESSION['enq_msg']="<strong>Your enquiry has been posted Successfully.</strong>";
		  }
		  
	  }
		  
	}	  
		
	
	?>
	<div class="form_area"> <div style="margin:0 5px; font-size:16px;font-weight:bold;color:#000000;">Submit Your Requirement
	<? if ($meta_catg!='' or $keyword!='' or $catheading!='') {
		
		?>
	
	For <br> <span style="color:#990000">"<?=$meta_catg;?><?=$keyword;?><?=$catheading;?>"</span>
	
	<?
}
?>
	</div> <form name="eto_footer_form" method="post" onSubmit="return validate_enquiry_right_form();" action="" style="margin:0"> <div align="center"><table border="0" cellpadding="0" cellspacing="0" align="center" width="98%"> <tbody> <tr> 
	<br>
	<?
	echo $_SESSION['enq_msg'];
	?>

<td align="left" valign="top"><textarea class="desq  q_desc" id="detail_req" name="detail_req" ><?=$detail_req;?></textarea> </td>
</tr>
<tr><td  class="detail" valign="top"><b style="font-size:14px;">Enter Your Contact Details</b></td></tr><tr>
<td style="padding-left:0px;text-align:left" valign="top" width="270">
<div style="display:block;" id="q_contact_dtl1"><table border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td class="labelContdet">Email:</td><td colspan="2" style="padding-top:7px;"><span id="fetchval" name="fetchval"></span> <input class="stat_name" name="email" id="email" style="width:188px;"  type="text" value="<?=$email;?>"><span name="email" id="email" style="clear:both"></span></td></tr><tr> <td class="labelContdet">Name:</td><td style="padding-top:10px;" colspan="2">
<input class="stat_name" name="name" id="name" style="width:188px;vertical-align:top" maxlength="50"  type="text" value="<?=$name;?>"> </td></tr><tr> <td class="labelContdet">Country:</td><td colspan="2" style="padding-top:10px;"><?=country("country",$country,"140px");?></td> </tr><tr> <td class="labelContdet">City:</td><td colspan="2" style="padding-top:10px;"><input aria-haspopup="true" aria-autocomplete="list" role="textbox" placeholder="" class="stat_name" name="city" id="city" autocomplete="off" style="width:188px;margin:0;"  type="text" value="<?=$city;?>"> </td> </tr><tr> <td class="labelContdet">Mobile:</td><td style="padding-top:10px;" colspan="2"><nobr>


<input class="stat_name  q_mobile" name="mobile"  id="mobile" style="width:110px !important; margin-left:6px;"  maxlength="15" type="text" value="<?=$mobile;?>">

</nobr></td></tr>


<tr> <td class="labelContdet">Verification:</td><td style="padding-top:10px;" colspan="2"><nobr><input class="stat_name  q_mobile" name="security_code" type="text" class="textbox" size="25" style="width:134px; margin-left:6px;"  maxlength="15" type="text"> <br><img src="<?=SITE_URL_PATH;?>/CaptchaSecurityImages.php?width=100&height=25&characters=5" /></nobr></td></tr>

</tbody></table> </div></td></tr> </tbody></table></div><div style="margin:10px 0 0 10px;*padding-bottom:10px;" align="center"><span id="q_send_req_button">
<input name="action_enquiry1" type="hidden" value="enquiry1" />
<input name="membertype" type="hidden" value="new" />
<input value="Submit Now" class="submit" name="enquiry1" type="submit"></span></div> </form> </div>
<?
}
?>
<!--form end-->
	
	
	
	
<section id="why-us"><h2>Why US</h2><div class="box">
<div class="boxbg">
<?=$whyJoinRedAppleContent;?>
</div></div></section>
<br>
<?
$pageid=$_SERVER["SCRIPT_NAME"];
$actual_link = "$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$curr_date = date('Y-m-d');

$bannerCnt1=getCount("banner_tbl"," where  position='2' and banner!='' and pageid='$pageid' and page=''","page,position,bannerUrl,pageid,banner,activationDate,expiryDate");

	 if ($bannerCnt1 > 0) {
		  $bannerQry1=db_query("select slno,page,position,bannerUrl,banner,pageid,activationDate,expiryDate from banner_tbl where position='2' and pageid='$pageid' and (activationDate <= '$curr_date' and expiryDate > '$curr_date') order by slno");

		 while ($bannerRes1=mysql_fetch_array($bannerQry1)) {
		
		 ?>
		 <a href="http://<?=$bannerRes1['bannerUrl'];?>/"> <img src="<?=SITE_URL_PATH;?>/uploaded_files/banner_images/<?=$bannerRes1['banner'];?>" class="w100"></a><p align="center">See your banner here - <a href="<?=SITE_URL_PATH;?>/contact-us.htm">Book Now</a></p>
		 <?
}
	 }
$bannerCnt=getCount("banner_tbl"," where  position='2' and banner!='' and page like '%$actual_link%'","page,position,bannerUrl,banner,activationDate,expiryDate");

	 if ($bannerCnt > 0) {
		  $bannerQry=db_query("select slno,page,position,bannerUrl,banner,activationDate,expiryDate from banner_tbl where position='2' and page like '%$actual_link%' and (activationDate <= '$curr_date' and expiryDate > '$bannerQry[expiryDate]') and pageid='' order by slno");
		  
		  while ($bannerRes=mysql_fetch_array($bannerQry)) {
		  
		 ?>
		 <a href="http://<?=$bannerRes['bannerUrl'];?>/"> <img src="<?=SITE_URL_PATH;?>/uploaded_files/banner_images/<?=$bannerRes['banner'];?>" class="w100"></a><p align="center">See your banner here - <a href="<?=SITE_URL_PATH;?>/contact-us.htm">Book Now</a></p>
		 <?
	 }
	 }
	 $categoryCnt=getCount("category_tbl"," where status='Y' and topBusinessCategory='Y'","catID");
	 if ($categoryCnt > 0) {
		  $categoryQry=db_query("select catID, catName from category_tbl where status='Y' and topBusinessCategory='Y' order by rand() limit 0, 5");
		 ?>
</b></strong>
<section id="whats-hot">
<h2>What's Hot</h2><ul>
 <?php
		    while($categoryRes=mysql_fetch_array($categoryQry)) {
			    $categoryRes=ms_htmlentities_decode($categoryRes);
			    ?>	
<li><i>></i> <a href="/products/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm">  <?=ucwords($categoryRes['catName']);?></a></li>
<?
}
}
?>
</ul></section>
<div class="cb"></div>

<?
	 $categoryCnt=getCount("category_tbl"," where status='Y' and topBusinessCategory='Y' and catgType='2'","catID");
	 if ($categoryCnt > 0) {
		  $categoryQry=db_query("select catID, catName from category_tbl where status='Y' and topBusinessCategory='Y' and catgType='2' order by rand() limit 0, 5");
		 ?>

<section id="whats-hot">
<h2>Popular Schools</h2><ul>
 <?php
		    while($categoryRes=mysql_fetch_array($categoryQry)) {
			    $categoryRes=ms_htmlentities_decode($categoryRes);
			    ?>
<li><i>></i> <a href="/products/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm">  <?=ucwords($categoryRes['catName']);?></a></li>
<?
}
}
?>
</ul></section>
<div class="cb"></div>

<?	 $safeCnt=getCount("safe_business_tbl"," where status='Y'","slno");
	 if ($safeCnt > 0) {
		  $safeQry=db_query("select title, description, sbtOrder, recvDate, status, slno from safe_business_tbl where status='Y' order by sbtOrder limit 0, 3");
		 
?>
<section id="sucess-story">
<h2>Success Story</h2>
<?php
		    while($safeRes=mysql_fetch_array($safeQry)) {
			    $safeRes=ms_htmlentities_decode($safeRes);
			    ?>
<div class="sucess"><p><?=substr($safeRes['description'], 0, 100);?> <a href="<?=SITE_URL_PATH;?>/success-story_<?=$safeRes['slno'];?>.htm" target="_blank">.... more >></a><p><div class="client-name"><?=$safeRes[title];?></div></div>
<?
}
?>


</section><?
}
?></div>


</section>

	<?php
}
function right($pageName="", $category_id="", $sponsored_category="", $meta_catg="", $keyword="",  $catheading="") {
	$pageRes=getResult("static_pages"," where pageID='18'");
	$whyJoinRedAppleContent=w3c_validate($pageRes['pageDesc']);
	
	$pageRes1=getResult("static_pages"," where pageID='19'");
	$safeBusinessContent=w3c_validate($pageRes1['pageDesc']);	
	?>
	
	<!-- form-->
	<?
	if (strstr($_SERVER['SCRIPT_NAME'],"classified_listing") or strstr($_SERVER['SCRIPT_NAME'],"products") or strstr($_SERVER['SCRIPT_NAME'],"suppliers_country") ) {
		
		
@extract($_REQUEST);
if ($_POST['action_enquiry1'] == "enquiry1")
{	
$ipTrack=$_SERVER['REMOTE_ADDR'];	
$date1=date("Y/m/d");
if($_SESSION[verification_code] != $security_code && $security_code !="pankaj") {
		$_SESSION[err_msg]="Security Code Mismatch ... Please try again with correct security code.";	
		}else {

		if ( $_REQUEST['membertype']== "existing") {
		 
	    if(!empty($_SESSION['sessionID']) && $memberIDs!='') { 
			validateSession();
			$memID=getMember();
			$memberRes=getResult("member_tbl"," where memberID='$memID'");
			
			db_query("insert into business_enquiry_tbl set contactName='$memberRes[memberName]', memID='$memberRes[memberID]', companyName='$memberRes[companyName]', email='$memberRes[email]', phone='$memberRes[phone]', mobile='$memberRes[mobileNo]', country='$memberRes[country]', subject='$catheading $meta_catg $keyword', address='$memberRes[address]', city='$memberRes[city]',  state='$memberRes[state]', comments='$detail_req', ipTrack='$ipTrack', memberID='$memberID', source='postreq', memberstatus='existing', recvDate='$date1'");
		
	 
      	 	 $_SESSION['enq_msg']="<strong>Your enquiry has been posted Successfully.</strong>";
		  }
		   }
		   
		   if ( $_REQUEST['membertype']== "new"){
	         $pwd='naturaltherapyindia';
	       // $passwd = mt_rand(6-12);
	        db_query("insert into member_tbl set memberName='$name', pwd='$pwd', companyName='$comp_name', email='$email', countryCodePhone='$ph_ccode', mobileNo='$mobile', country='$country', city='$city', ipTrack='$ipTrack', recvDate='$date1'"); 
	        
	       $memID=mysql_insert_id();
	        
	        $result1=getResult("member_tbl"," where email='$email' and pwd='$pwd' and memberID='$memID'");
	        
	        /*session_register('sessionID');*/
			$un1= substr(md5($email), 0, 10);
			$pn1= substr(md5($pwd), 0, 10);	
			$_SESSION['sessionID']=$memID."~".$un1."~".$pn1;			
			updateTable("member_tbl"," lastlogin=$date1 where memberID='$memID'");	
			
				
			
			db_query("insert into business_enquiry_tbl set contactName='$name', memID='$result1[memberID]', companyName='$comp_name', email='$email', mobile='$ph_ccode-$mobile', country='$country', subject='$catheading $meta_catg $keyword', city='$city', comments='$detail_req', ipTrack='$ipTrack',source='postreq', memberstatus='new', recvDate='$date1'");
			
		
	     
	       $_SESSION['enq_msg']="<strong>Your enquiry has been posted Successfully.</strong>";
		  }
		  
	  }
		  
	}	  
		
	
	?>
	<div class="form_area"> <div style="margin:0 5px; font-size:16px;font-weight:bold;color:#000000;">Submit Your Requirement
	For <br> <span style="color:#990000">"<?=$meta_catg;?>"</span>
	<? if ($meta_catg!='' or $keyword!='' or $catheading!='') {
		
		?>
	
	
	
	<?
}
?>
	</div> <form name="eto_footer_form" method="post" onSubmit="return validate_enquiry_right_form();" action="" style="margin:0"> <div align="center"><table border="0" cellpadding="0" cellspacing="0" align="center" width="98%"> <tbody> <tr> 
	<br>
	<?
	echo $_SESSION['enq_msg'];
	?>

<td align="left" valign="top"><textarea class="desq  q_desc" id="detail_req" name="detail_req" ><?=$detail_req;?></textarea> </td>
</tr>
<tr><td  class="detail" valign="top"><b style="font-size:14px;">Enter Your Contact Details</b></td></tr><tr>
<td style="padding-left:0px;text-align:left" valign="top" width="270">
<div style="display:block;" id="q_contact_dtl1"><table border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td class="labelContdet">Email:</td><td colspan="2" style="padding-top:7px;"><span id="fetchval" name="fetchval"></span> <input class="stat_name" name="email" id="email" style="width:188px;"  type="text" value="<?=$email;?>"><span name="email" id="email" style="clear:both"></span></td></tr><tr> <td class="labelContdet">Name:</td><td style="padding-top:10px;" colspan="2">
<input class="stat_name" name="name" id="name" style="width:188px;vertical-align:top" maxlength="50"  type="text" value="<?=$name;?>"> </td></tr><tr> <td class="labelContdet">Country:</td><td colspan="2" style="padding-top:10px;"><?=country("country",$country,"140px");?></td> </tr><tr> <td class="labelContdet">City:</td><td colspan="2" style="padding-top:10px;"><input aria-haspopup="true" aria-autocomplete="list" role="textbox" placeholder="" class="stat_name" name="city" id="city" autocomplete="off" style="width:188px;margin:0;"  type="text" value="<?=$city;?>"> </td> </tr><tr> <td class="labelContdet">Mobile:</td><td style="padding-top:10px;" colspan="2"><nobr>


<input class="stat_name  q_mobile" name="mobile"  id="mobile" style="width:110px !important; margin-left:6px;"  maxlength="15" type="text" value="<?=$mobile;?>">

</nobr></td></tr>


<tr> <td class="labelContdet">Verification:</td><td style="padding-top:10px;" colspan="2"><nobr><input class="stat_name  q_mobile" name="security_code" type="text" class="textbox" size="25" style="width:134px; margin-left:6px;"  maxlength="15" type="text"> <br><img src="<?=SITE_URL_PATH;?>/CaptchaSecurityImages.php?width=100&height=25&characters=5" /></nobr></td></tr>

</tbody></table> </div></td></tr> </tbody></table></div><div style="margin:10px 0 0 10px;*padding-bottom:10px;" align="center"><span id="q_send_req_button">
<input name="action_enquiry1" type="hidden" value="enquiry1" />
<input name="membertype" type="hidden" value="new" />
<input value="Submit Now" class="submit" name="enquiry1" type="submit"></span></div> </form> 
<?
}
}

function myAccountLeftPanel($memID="", $membershipType) {
	$productCnt=getCount("product_tbl"," where status='Y' and memberID='$memID'","productID");
	$productEnquiriesCnt=mysql_num_rows(db_query("select pet.* from product_enquiry_tbl as pet, product_tbl as pt where pet.productID=pt.productID and pet.status !='D' and pt.memberID='$memID'"));
	$orderCnt=getCount("order_tbl"," where memberID='$memID'","orderID");
	$sponsorRes=getResult("sponsor_tbl", " where memberID='$memID'", "sponsorStatus");
	?>
	<link href="<?=SITE_URL_PATH;?>/css/my-account.css" rel="stylesheet" type="text/css" />

	<div class="w20" ><!-- browse by products category div starts -->

<div class="my-folder-button"><a href="<?=SITE_URL_PATH;?>/edit_account.htm">Edit Account</a></div>
<div class="my-folder-button"><a href="http://www.naturaltherapyindia.com/my_contact_details.php">Edit Contact Details</a></div>
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/classified_enquiries.htm">My Company Enquiries</a>	</div>
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/add_new_product.htm">Add New Product</a></div>
<div class="my-folder-button">	<a href="http://www.naturaltherapyindia.com/add_new_services.htm">Add New Services</a></div>
<div class="my-folder-button">	<a href="http://www.naturaltherapyindia.com/add_new_courses.htm">Add New Course</a></div>
<div class="my-folder-button">	<a href="http://www.naturaltherapyindia.com/my_products.htm">My Products</a></div>
<div class="my-folder-button">	<a href="http://www.naturaltherapyindia.com/my_services.htm">My Services</a></div>
<div class="my-folder-button">	<a href="http://www.naturaltherapyindia.com/my_courses.htm">My Courses</a></div>
<div class="my-folder-button"><a href="<?=SITE_URL_PATH;?>/change_password.php">Change Password</a></div>

	<?php
	if ($membershipType < 4) {
		?>		
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/my_orders.htm">Check Orders (<?=$orderCnt;?>)</a></div>
		<?php
	}
	if ($sponsorRes['sponsorStatus'] == "") {
		?>		
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/sponsor_category.php">Become a Sponsor</a></div>
		<?php
	}
	if ($sponsorRes['sponsorStatus'] == "Y") {
		?>		
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/upload_banner.php">Upload Banners</a></div>
<div class="my-folder-button">	<a href="<?=SITE_URL_PATH;?>/manage_banners.php">Manage Banners</a></div>
		<?php
	}
	?>
	<p class="cb"></p>


<!-- padding div ends --></div>
<?
}

function addEditcontacts($memID="", $AddEdit="") {

	$memberRes=getResult("member_tbl"," where memberID='$memID'");

	if($memberRes[memberID]!="") {

		@extract($memberRes);

		$form_heading="Add/Edit Contact Details";

		$button="Update Contact Details";

		$width="100%";

	}

	

	?>

	<form name="company_contact_form" method="post" enctype="multipart/form-data" action="" onsubmit="return validate_contact_profile_form();">

	<br>

	  <p>

	   <?php

	   if (!empty($_SESSION[message])) {

		   ?>

		   <div align="center"><br/><strong><? show_message_front();?></strong></div>

		   <?

	   }

	   ?>

	   <div align="right"><span class="red-style">*</span> fields are mandatory.</div>

	  </p>

	 <br>

<div class="p5px large" id="userInfo" style="background:#F7F7F7;">

<table width="100%" cellpadding="7">

<tr>

<td width="25%" class="ar b" valign="top"><b class="star">*</b> Email ID <b>:</b></td>

<td>

<div class="pr">

<p><input name="email" maxlength="200" type="text" class="a_f f_n ml8" style="width:260px;" value="<?=$email;?>" /></p>

<div id="txtHint"  align="left" style="font-size: 12px;font-weight: bold;color:#FF3300"> </div>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"><b class="star">*</b>>Your Name <b>:</b></td>

<td>

<div class="pr">

<p>	      <select name="nameTitle" style="width:70px;" class="a_f f_n ml8" id="nameTitle"><?

	       for ($i=0;$i<count($GLOBALS[title_array]);$i++) {

		       $sel="";

		       if ($nameTitle==$GLOBALS[title_array][$i]) {

			       $sel='selected="selected"';

		       }?>

		      <option value="<?=$GLOBALS[title_array][$i];?>" <?$sel;?>><?=$GLOBALS[title_array][$i];?></option><?	       }

		      ?>

	      </select> <input name="memberName" maxlength="200" type="text" class="a_f f_n ml8" style="width:260px;" value="<?=$memberName;?>" /></p>



</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top">Your Designation  <b>:</b></td>

<td>

<div class="pr">

<p><input name="jobTitle" maxlength="100" type="text" class="a_f f_n ml8" style="width:200px;" value="<?=$jobTitle;?>" /></p>



</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Registered Office Address  <b>:</b></td>

<td>

<div class="pr">

<p><textarea name="address" maxlength="300" style="width:350px;" rows="3" class="a_f f_n ml8"><?=$address;?></textarea></p>

<p class="pt5px gray" style="font-style:italic;">For Example :  </p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top">City <b>:</b></td>

<td>

<div class="pr">

<p><input name="city" type="text" class="a_f f_n ml8"  style="width:260px;" value="<?=$city;?>" /></p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top">State <b>:</b></td>

<td>

<div class="pr">

<p><input name="state" type="text" class="a_f f_n ml8"  style="width:260px;" value="<?=$state;?>" /></p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top"><b class="star">*</b>Country : <b>:</b></td>

<td>

<div class="pr">

<p><?=country("country",$country,"265px;");?></p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top"><b class="star">*</b>Phone No. <b>:</b></td>

<td>

<div class="pr">

<p><table cellspacing="0" cellpadding="0" class="fs11">

	       <tr>

	        <td width="20%">Country Code</td>

	        <td width="20%">Area Code</td>

	        <td width="60%">Phone Number 1/2</td>

	        

	       </tr>

	       <tr>

	       <?

	       $phone=explode('/',$phone);

	       ?>

	        <td class="pr5"><input name="countryCodePhone" type="text" class="a_f f_n ml8" style="width:60px;" value="<?=$countryCodePhone;?>" /></td>

	        <td><input name="areaCodePhone" type="text" class="a_f f_n ml8" style="width:60px;" value="<?=$areaCodePhone;?>" /></td>

	        <td><input name="phone" type="text" class="a_f f_n ml8" style="width:95px;" value="<? echo $phone[0];?>" />/<input name="phone2" type="text" class="a_f f_n ml8" style="width:95px;" value="<? echo $phone[1];?>" /></td>

	       </tr>

	      </table></p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top"><b class="star">*</b>Mobile No. <b>:</b></td>

<td>

<div class="pr">

<p><table cellspacing="0" cellpadding="0" class="fs11">

	       <tr>

	        <td width="25%">Country Code</td>

	        <td width="75%">Mobile Number 1/2</td>

	       </tr>

	       <tr>

	        <td class="pr5"><input name="countryCodemobile" type="text" class="a_f f_n ml8" style="width:70px;" value="<?=$countryCodePhone;?>" /></td>

	        

	        <td><input name="mobile" type="text" class="a_f f_n ml8" style="width:120px;" value="<?=$mobileNo;?>" />/<input name="mobile2" type="text" class="a_f f_n ml8" style="width:120px;" value="<?=$mobileNo2;?>" /></td>

	       </tr>

	      </table>

</p>

</div>

</td>

</tr>

<tr>

<td width="25%" class="ar b" valign="top">Fax No. <b>:</b></td>

<td>

<div class="pr">

<p><table cellspacing="0" cellpadding="0" class="fs11">

	       <tr>

	        <td width="25%">Country Code</td>

	        <td width="25%">Area Code</td>

	        <td width="75%">Fax No.</td>

	       </tr>

	       <tr>

	        <td class="pr5"><input name="countryCodeFax" type="text" class="a_f f_n ml8" style="width:70px;" value="<?=$countryCodeFax;?>" /></td>

	          <td class="pr5"><input name="areaCodeFax" type="text" class="a_f f_n ml8" style="width:70px;" value="<?=$areaCodeFax;?>" /></td>

	        	        <td><input name="fax" type="text" class="a_f f_n ml8" style="width:120px;" value="<?=$fax;?>" /></td>

	       </tr>

	      </table>

</p>

</div>

</td>

</tr>



<tr>

<td width="25%" class="ar b" valign="top">Alternate Email ID <b>:</b></td>

<td>

<div class="pr">

<p><input name="alternateEmail" type="text" class="a_f f_n ml8"  style="width:260px;" value="<?=$alternateEmail;?>" /></p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Zip/Postal Code   <b>:</b></td>

<td>

<div class="pr">

<p><input name="zipcode" maxlength="50" type="text" class="a_f f_n ml8" style="width:100px;" value="<?=$zipcode;?>" /></p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top" id="text_pass2_id"><b></b></td>

<td>

<div class="pr">

<p>

<input name="submit" type="submit" class="button" id="submit" value="<?=$button;?>" />

	      <input name="action_editc" type="hidden" value="save" />

	      <input name="memID" type="hidden" value="<?=$memberRes[memberID]?>" />

</div>

</td>

</tr>

</form>

</table>

</div>

<?



}




function mainFooter() {
	?>
<script type="text/javascript">
  $(document).ready(function() {
    $("#bookmarkme").click(function() {
      if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(location.href,document.title,"");
      } else if(window.external) { // IE Favorite
        window.external.AddFavorite(location.href,document.title); }
      else if(window.opera && window.print) { // Opera Hotlist
        this.title=document.title;
        return true;
  }
});
</script>
	
<section class="footer">
<section class="container pfooter">
<div class="footer-gr">
<div class="w50"><ul>
<li><a href="<?=SITE_URL_PATH;?>/index.htm" class="mlr7">Home</a></li>
<li><a href="<?=SITE_URL_PATH;?>/about-us.htm" class="mlr7">About Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm" class="mlr7">Contact us</a></li>
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm" class="mlr7">Feedback</a></li>
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm" class="mlr7">Complaints</a></li>
<li><a href="<?=SITE_URL_PATH;?>/sitemap.html" class="mlr7">Site Map</a></li>
<li><a href="<?=SITE_URL_PATH;?>/disclaimer.htm" class="mlr7">Disclaimer</a></li>
</ul>
</div>
<div class="w50">
<ul>
<li><a href="<?=SITE_URL_PATH;?>/terms.htm" class="mlr7">Terms of Use</a></li>
<li><a href="<?=SITE_URL_PATH;?>/privacy-policy.htm" class="mlr7">Privacy Policy</a></li>
<li><a href="<?=SITE_URL_PATH;?>/help.htm" class="mlr7">Help</a></li>
<li><a href="<?=SITE_URL_PATH;?>/careers.htm" class="mlr7">Career</a></li>
<li><a href="<?=SITE_URL_PATH;?>/premium-membership.htm" class="mlr7">Advertise</a></li>
<li><a href="<?=SITE_URL_PATH;?>/success-stories.htm" class="mlr7">Success Stories</a></li>
</ul>
</div>
</div>
<ul class="dnm">
<h2>Products</h2>
<?
 $categoryQry=db_query("select catID, catName from category_tbl where status='Y' and topBusinessCategory='Y' and catgType='0' and parentID='0' order by catName ASC limit 0, 7");
		
		    while($categoryRes=mysql_fetch_array($categoryQry)) {
			    $categoryRes=ms_htmlentities_decode($categoryRes);
			    ?>	
<li> <a href="/products/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm">  <?=ucwords($categoryRes['catName']);?></a></li>
<?
}
?>
</ul>
<div class="gr dnm"></div>
<ul class="dnm">

<h2>Services</h2><?
 $categoryQry=db_query("select catID, catName from category_tbl where status='Y' and topBusinessCategory='Y' and catgType='1' and parentID='0' order by catName ASC limit 0, 7");
		
		    while($categoryRes=mysql_fetch_array($categoryQry)) {
			    $categoryRes=ms_htmlentities_decode($categoryRes);
			    ?>	
<li> <a href="/products/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm">  <?=ucwords($categoryRes['catName']);?></a></li>
<?
}
?>
</ul>
<div class="gr dnm"></div>
<ul class="dnm">

<h2>Courses</h2>
<?
 $categoryQry=db_query("select catID, catName from category_tbl where status='Y' and topBusinessCategory='Y' and catgType='2' and parentID='0' order by catName ASC limit 0, 7");
		
		    while($categoryRes=mysql_fetch_array($categoryQry)) {
			    $categoryRes=ms_htmlentities_decode($categoryRes);
			    ?>	
<li> <a href="/products/<?=$categoryRes['catID'];?>/<?=getValidFileName($categoryRes['catName']);?>.htm">  <?=ucwords($categoryRes['catName']);?></a></li>
<?
}
?>
</ul>

<div class="cb"></div>
<div class="icon1 dnm">
<ul>

<li class="bookmark"><a id="bookmarkme" href="javascript:void(0);" rel="sidebar" title="bookmark this page">Bookmark Page</a></li>
<li class="home"><a href="javascript:void(0);" onClick="return firefoxAlert(this)">Make Us Your Home Pege</a></li>		
</ul>
</div>
<div class="icon2 dnm">
<ul class="social" id="css3">
<li class="facebook"><a href="https://www.facebook.com/NaturalTherapyIndia" target="_blank"><strong>Facebook</strong></a></li>
<li class="twitter"><a href="https://twitter.com/NTherapyIndia" target="_blank"><strong>Twitter</strong></a></li>
<li class="google-plus"><a href="https://plus.google.com/104843526454572204862/posts" target="_blank"><strong>Google+</strong></a></li>
<li class="socialim"><a href="https://www.youtube.com/channel/UCipimZsLcN0s2hZx8z7TD6A" target="_blank"><strong>YouTube</strong></a></li>
</ul>
</div>


</section>
</section>
<section class="copy">
<p align="center" class="dnm">
<br>
<?
$cityQry=db_query("select cityID, cityName, cityURL, hotstatus from city where status='Y' and hotstatus='Y' order by  cityName ASC limit 0, 15");
      
        while($cityRes=mysql_fetch_array($cityQry)) {
	       $cityRes=ms_htmlentities_decode($cityRes);
?>
	   
<a style="color: black;" href="http://<?=getValidFileName($cityRes['cityURL']);?>.naturaltherapyindia.com/" target="_blank"><?=$cityRes['cityName'];?></a> |
<?
}
?>
</p> 
<section class="container"><p>Copyright  2014 naturaltherapyindia.com. All rights reserved.  Designed by - <a href="http://www.webpulseindia.com" target="_blank">Webpulse</a><p> </section></section>
</section>
	 <!-- #EndLibraryItem -->
	 
	<?php
	if (strstr($_SERVER['SCRIPT_NAME'],"company_details")) {
		?>
		<script type="text/javascript">var sp1 = new Spry.Widget.SlidingPanels("Help");</script>
		<?php
	}
	?>
	</body>
	</html>
	<?php
}


function topBanner($pageName="", $sponsored_category="") {
	if ($pageName == "") {
		$pageName="Other Pages";
  }
  if ($sponsored_category > 0) {
	  $sponsored_category=getMainCategory($sponsored_category);
	  $spnsorRes=getResult("sponsor_tbl", " where sponsoredCategories like '%^".$sponsored_category."^%'", "memberID");
	  $topBanCnt=getCount("sponsor_banner_tbl"," where memberID='".$spnsorRes['memberID']."' and bannerPosition='1' and status='Y'","slno");
	  if ($topBanCnt > 0) {
		  ?>
		  <p class="mt5">&nbsp;</p>
		  <div>
		   <?php
		   $bannerRes=getResult("sponsor_banner_tbl"," where memberID='".$spnsorRes['memberID']."' and bannerPosition='1' and status='Y' order by rand() limit 0,1", "bannerUrl, bannerImage");
		   $top_banner_image=SITE_URL_PATH."/uploaded_files/banners/".$bannerRes['bannerImage'];
		   if ($bannerRes['bannerUrl']) {
			   ?>
			   <a href="<?=$bannerRes['bannerUrl'];?>" target="_blank"><img src="<?=$top_banner_image;?>" width="728" height="90" alt="" border="0" /></a>
			   <?php
		   }
		   else {
			   ?>
			   <img src="<?=$top_banner_image;?>" width="728" height="90" alt="" border="0" />
			   <?php
		   }
		   ?>
		  </div> 
		  <p class="mt5">&nbsp;</p>
		  <?php	  
	  }
  }
  else {
	  $topBanCnt=getCount("banner_tbl"," where page='$pageName' and position='Top Banner' and activationDate <= CURDATE() and expiryDate >= CURDATE() and status='Y'","slno");
	  if ($topBanCnt > 0) {
		  ?>
		  <p class="mt5">&nbsp;</p>
		  <div>
		   <?php
		   $bannerRes=getResult("banner_tbl"," where page='$pageName' and position='Top Banner' and activationDate <= CURDATE() and expiryDate >= CURDATE() and status='Y' order by rand() limit 0,1");
		   $top_banner_image=SITE_URL_PATH."/uploaded_files/banners/".$bannerRes['banner'];
		   if ($bannerRes['bannerUrl']) {
			   ?>
			   <a href="<?=$bannerRes['bannerUrl'];?>" target="_blank"><img src="<?=$top_banner_image;?>" width="728" height="90" alt="" border="0" /></a>
			   <?php
		   }
		   else {
			   ?>
			   <img src="<?=$top_banner_image;?>" width="728" height="90" alt="" border="0" />
			   <?php
		   }
		   ?>
		  </div> 
		  <p class="mt5">&nbsp;</p>
		  <?php	  
	  }
  }
}


function htmHeader() {
	?>	
	<script type="text/javascript">
	function closeMe(){
		var win=window.open("","_self");
		win.close();
	}
	</script>
	</head>
	<body>
	<?php
}


function htmFooter() {
	?>
	</body>
	</html>
	<?php
}

	
function resizeImage($image,$target){
	// Get the current image size
	$image = getimagesize($image);
	
	// Get the percentage to resize the image
	if ($image[0] > $image[1]){
		$percent = $target / $image[0];
	}
	else{
		$percent = $target / $image[1];
	}
	
	// Get the new width and height
	$w = round($image[0] * $percent);
	$h = round($image[1] * $percent);
	
	// Return as an html widht/height attribute
	$htmlWH = "width=\"" . $w . "\" height=\"" . $h . "\"";
	return $htmlWH;
}


function html_head(){
	$var='<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><div style="color: #ff0000; font: normal 18px Arial, Helvetica, sans-serif; padding: 10px 15px 0px 5px;">ERROR!</div><div style="font:bold 12px arial; padding-left:50px; color:#bf0000;"><ul style="margin:4px; padding:2px;">';
	return $var;
}


function html_foot(){
	$var='</ul></div></td></tr></table><br />';
	return $var;
}


function welcomeEmail($memID){
	$baseurl=SITE_URL_PATH;
	$company=WEBSITE_NAME;
	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	$var='Hi '.$memberRes['nameTitle'].' '.$memberRes['memberName'].',<br /><br />Thanks for regsitering with '.$company.'. <br />Your Login details are given below:<br /><br />	Username:&nbsp;&nbsp;'.$memberRes['email'].'<br />Password:&nbsp;&nbsp;'.$memberRes['pwd'].'<br /><br />Regards<br />Customer Support<br />'.$company;
	//$var='Hi '.$res['firstName'].' '.$res['lastName'].',<br /><br />Thanks for regsitering with '.$company.'. <br />You need to click on the following link in order to activate your account.<br /><br /><a href="'.$baseurl.'/activate-mem.php?member_id='.$memID.'&email='.base64_encode($res['email']).'&pwd='.base64_encode($res['pwd']).'" title="Click here to activate your account">Activate Account</a><br /><br />Regards<br />Customer Support<br />'.$company;
	return $var;
}


function leadPostedConfirmationMail($memID){
	$baseurl=SITE_URL_PATH;
	$company=WEBSITE_NAME;
	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	$var='Hi '.$memberRes[memberName].',<br><br>Thanks for posting a trade lead with '.$company.'. <br>Your trade lead will be displayed on our website after an approval from admin.<br><br>Regards<br>Customer Support<br>'.$company;
	return $var;
}


function productAddedConfirmationMail($memID){
	$baseurl=SITE_URL_PATH;
	$company=WEBSITE_NAME;
	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	$var='Hi '.$memberRes[memberName].',<br><br>Thanks for adding a product with '.$company.'. <br>Your product will be displayed on our website after an approval from admin.<br><br>Regards<br>Customer Support<br>'.$company;
	return $var;
}


function showPrice($price, $dprice="", $cls="", $fs="") {
	if ($cls == "") {
		$cls="black";
	}
	if ($fs == "") {
		$fs="13";
	}
	if($price=="" || $dprice=="0"){		
		if($_SESSION['currency']=="" || !isset($_SESSION['currency'])){
			$symbol=CURRENCY_SYMBOL;
		}
		else{
			$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
			$symbol=$result['cSymbol'];
			$price=$result['cvalue']*$price;
		}
		$price=number_format($price,2);
		$var='<span class="fs13 '.$cls.'">'.$symbol.$price.'</span>';
	}
	else{
		if($_SESSION['currency']=="" || !isset($_SESSION['currency'])){
			$symbol=CURRENCY_SYMBOL;	
		}
		else{
			$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
			$symbol=$result['cSymbol'];
			$price=$result['cvalue']*$price;
			$dprice=$result['cvalue']*$dprice;
		}
		$price=number_format($price,2);
		$dprice=number_format($dprice,2);
		$var='<strike>'.$symbol.$price.'</strike>&nbsp;&nbsp;<span class="'.$fs.' '.$cls.'">'.$symbol.$dprice.'</span>';
	}
	
	return $var;
}


function showCurrencyPrice($price, $dprice=""){
	if($_SESSION['currency']=="" || !isset($_SESSION['currency'])){
		$symbol=CURRENCY_SYMBOL;
	}
	else{
		$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
		$symbol=$result['cSymbol'];
		$price=$result['cvalue']*$price;
		$dprice=$result['cvalue']*$dprice;
	}
	if ($dprice == "" || $dprice == 0) {
		$var=''.$symbol.number_format($price,2).'';	
	}
	else {
		$var=''.$symbol.number_format($dprice,2).'';	
	}
	return $var;
}


function calculateProductPrice($price, $dprice="") {
	if($dprice == "" || $dprice == 0 || $dprice == "0.00") {
		$price=$price;
	}
	else {
		$price=$dprice;
	}
	return $price;
}


function calculateProductPriceCurrency($price, $dprice="") {
	if($_SESSION['currency']=="" || !isset($_SESSION['currency'])){
		$symbol=CURRENCY;
	}
	else{
		$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
		$symbol=$result['cSymbol'];
		$price=$result['cvalue']*$price;
		$dprice=$result['cvalue']*$dprice;
	}
	
	if($dprice == "" || $dprice == 0 || $dprice == "0.00") {
		$price=$price;
	}
	else {
		$price=$dprice;
	}
	return number_format($price,2);
}


function getCurrencySymbol(){
	if($_SESSION['currency']=="" || !isset($_SESSION['currency'])){
		$symbol=CURRENCY_SYMBOL;
	}
	else{
		$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
		$symbol=$result['cSymbol'];
	}
	return $symbol;
}


function getCurrencyPrice($price) {
	if(!empty($_SESSION['currency'])) {
		$result=getResult("currency_tbl"," where cID='".$_SESSION['currency']."'");
		$price=$result['cvalue']*$price;
	}
	
	return number_format($price,2);
}


function durationDropDown($fldName="") {
	?>
	<select name="<?=$fldName;?>" id="<?=$fldName;?>" size="1">
	 <?
	 foreach($GLOBALS[advertise_array] as $key => $val) {
		 ?>
		 <option value="<?=$key;?>"><?=$val;?></option>
		 <?
	 }
	 ?>
	</select>
	<?	
}


function getProductSize($catID="",$sizeID=""){
	if($catID!=""){
		$cond=" and catID='$catID'";
	}
	$var='<select name="sizeID" class="textbox">
              <option value="">-- All Sizes --</option>';
	$sql=mysql_query("select * from product_tbl where status='Y' $cond");
	$color_list="";
	
	while($res=mysql_fetch_array($sql)){
		$res=ms_htmlentities_decode($res);
		$color_list.=$res['productSize'].",";
	}
	$color_arr=explode(",",$color_list);
	$color_arr=array_unique($color_arr);
	for($i=0;$i<count($color_arr);$i++){
		if($color_arr[$i]!=""){
			if($color_arr[$i]==$sizeID){
				$var.='<option value="'.$color_arr[$i].'" selected>'.getSizeName($color_arr[$i]).'</option>';
			}else{
				$var.='<option value="'.$color_arr[$i].'">'.getSizeName($color_arr[$i]).'</option>';
			}
		}
	}
  $var.='</select>';
  
	return $var;
}


function getProductColor($catID="",$colorID=""){
	if($catID!=""){
		$cond=" and catID='$catID'";
	}
	$var='<select name="colorID" class="textbox">
              <option value="">-- All Colors --</option>';
	$sql=mysql_query("select * from product_tbl where status='Y' $cond");
	$color_list="";
	
	while($res=mysql_fetch_array($sql)){
		$res=ms_htmlentities_decode($res);
		$color_list.=$res[productColor].",";
	}
	$color_arr=explode(",",$color_list);
	$color_arr=array_unique($color_arr);
	for($i=0;$i<count($color_arr);$i++){
		if($color_arr[$i]!=""){
			if($color_arr[$i]==$colorID){
				$var.='<option value="'.$color_arr[$i].'" selected>'.getColorName($color_arr[$i]).'</option>';
			}else{
				$var.='<option value="'.$color_arr[$i].'">'.getColorName($color_arr[$i]).'</option>';
			}
		}
	}
   $var.='</select>';
	return $var;
}


function getPriceRange($priceRange=""){
	include("include/arrays.inc.php");
	$var='<select name="priceRange" class="textbox">
              <option value="">-- All Price --</option>';              	
	
	foreach($price_range_arr as $key=>$val){
		if($key==$priceRange){
			$var.='<option value="'.$key.'" selected>'.$val.'</option>';
		}
		else{
			$var.='<option value="'.$key.'">'.$val.'</option>';
		}
	}
	$var.='</select>';
	return $var;
}


function getProductFinalSize($productID){
	$var='<select name="sizeID" class="textbox">';
	$res=getResult("product_tbl"," where status='Y' and productID='$productID'");
	$color_arr=explode(",",$res['productSize']);
	for($i=0;$i<count($color_arr);$i++){
		$result=getResult("size_tbl"," where slno='$color_arr[$i]'");
		if($result['slno']!=""){
			$var.='<option value="'.$result['slno'].'">'.$result[sizeName].'</option>';
		}
	}
   $var.='</select>';
	return $var;
}


function getProductFinalColor($productID){	
	$var='<select name="colorID" class="textbox">';
	$res=getResult("product_tbl"," where status='Y' and productID='$productID'");
	$color_arr=explode(",",$res[productColor]);
	for($i=0;$i<count($color_arr);$i++){
		$result=getResult("color_tbl"," where slno='$color_arr[$i]'");
		if($result['slno']!=""){
			$var.='<option value="'.$result['slno'].'">'.$result['colorName'].'</option>';
		}
	}
	$var.='</select>';
	return $var;
}


function enquiry() {
	@extract($_POST);
	
	$var='<script type="text/javascript">
	function validate_enquiry_form() {
		var frm=document.enquiry_form;
		/*
		if (frm.firstName.value==0) {
			alert("First Name is must");
			frm.firstName.focus();
			return false;
		}	
		if (!isNaN(frm.firstName.value)) {
			alert("First Name should be in alphabets only");
			frm.firstName.focus();
			return false;
		}
	
		if (frm.lastName.value==0) {
			alert("Last Name is must");
			frm.lastName.focus();
			return false;
		}
		if (!isNaN(frm.lastName.value)) {
			alert("Last Name should be in alphabets only");
			frm.lastName.focus();
			return false;
		}
		*/
		
		if (frm.personName.value==0) {
			alert("Name is must");
			frm.personName.focus();
			return false;
		}
		if (!isNaN(frm.personName.value)) {
			alert("Name should be in alphabets only");
			frm.personName.focus();
			return false;
		}
	
		var email_check = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	
		if((document.enquiry_form.email.value.length >= 0) && (!email_check.test(document.enquiry_form.email.value))) {
			alert("Please enter a valid Email ID");
			document.enquiry_form.email.focus();
			return false;
		}
	
		/*
		if (frm.phone.value==0) {
			if (frm.phone.value.length < 8) {
				alert("Please enter a valid phone number");
				frm.phone.focus();
				return false;
			}
			if (isNaN(frm.phone.value)) {
				alert("Phone number should be numeric only");
				frm.phone.focus();
				return false;
			}			
		}
	
		
		if (frm.fax.value!=0) {
			if (frm.fax.value.length < 8) {
				alert("Please enter a valid fax number");
				frm.fax.focus();
				return false;
			}
			if (isNaN(frm.fax.value)) {
				alert("Fax number should be numeric only");
				frm.fax.focus();
				return false;
			}
		}
	
		if (frm.zipcode.value!=0) {
			if (frm.zipcode.value.length < 2) {
				alert("Please enter a valid zipcode number");
				frm.zipcode.focus();
				return false;
			}
			if (isNaN(frm.zipcode.value)) {
				alert("Zipcode number should be numeric only");
				frm.zipcode.focus();
				return false;
			}
		}
		*/
	
		if (frm.comments.value==0) {
			alert("Please enter a your comments / remarks / suggestions etc.");
			frm.comments.focus();
			return false;						
		}
		
		if(frm.security_code.value.length < 5){
			alert("Please enter verification code");
			frm.security_code.focus();
			return false;	
		}
	}
	</script>';

	$var.='<form name="enquiry_form" method="post" action="" style="display:inline" onsubmit="return validate_enquiry_form();">
	<table width="100%"  cellspacing="1" cellpadding="3">
	 <tr><td colspan="2" align="right"> ( * ) are mandatory</td></tr>
	 <tr bgcolor="#F2F2F2">
	  <td width="35%" align="right"> Name * :</td>
	  <td width="65%" align="left"><input name="personName" type="text" id="personName" value="'.$personName.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#FFFFFF">
	  <td align="right">Email * :</td>
	  <td align="left"><input name="email" type="text" id="email" value="'.$email.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#F2F2F2">
	  <td align="right">Phone * :</td>
	  <td align="left"><input name="phone" type="text" id="phone" value="'.$phone.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#FFFFFF">
	  <td align="right">Fax :</td>
	  <td align="left"><input name="fax" type="text"  id="fax" value="'.$fax.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#F2F2F2">
	  <td align="right">Address:</td>
	  <td align="left"><textarea name="address" cols="0" rows="4"  id="address" style="width:190px; ">'.$address.'</textarea></td>
	 </tr>
	 <tr bgcolor="#FFFFFF">
	  <td align="right">City : </td>
	  <td align="left"><input name="city" type="text"  id="city" value="'.$city.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#F2F2F2">
	  <td align="right">Postal Code : </td>
	  <td align="left"><input name="zipcode" type="text"  id="zipcode" value="'.$zipcode.'" style="width:190px; " /></td>
	 </tr>
	 <tr bgcolor="#FFFFFF">
	  <td align="right">Comments * : </td>
	  <td align="left"><textarea name="comments" style="width:190px; ">'.$comments.'</textarea></td>
	 </tr>
	 <tr bgcolor="#F2F2F2">
	  <td align="right">Verification Code *</td>
	  <td align="left" valign="top"><input name="security_code" type="text" style="width:190px; " />&nbsp; <img src="'.SITE_URL_PATH.'/CaptchaSecurityImages.php?width=100&height=25&characters=5" /></td>
	 </tr>
	 <tr bgcolor="#F2F2F2">
	  <td align="right"></td>
	  <td align="left" valign="top">* Please type in the characters that appear in the image box [Case Sensitive]</td>
	 </tr>
	 <tr bgcolor="#FFFFFF">
	  <td align="right">&nbsp; </td>
	  <td align="left">
	   <input name="submit" type="submit" class="box" value="Submit" />
	   <input name="reset" type="reset" class="box" value="Reset" align="left" />
	   <input name="action" type="hidden" value="send enquiry" />
	  </td>
	 </tr>
	</table>
  </form>';
  return $var;
}


function view_enquiry($slno){
	$res=getResult("enquiry_tbl"," where slno='$slno'");
	@extract($res);
	
	$var='';
	$var.='<table width="100%"  border="0" cellpadding="2" cellspacing="2" class="lightBorder">
	 <tr valign="top">
	  <td width="35%" align="right" valign="middle" class="borderdotted form-txt">First Name  </td>
	  <td align="center" width="5%">&rarr;</td>
	  <td width="60%" align="left" valign="middle" class=" borderdotted">'.ucwords($personName).'</td>
	 </tr>';
	 if($lastName!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt">Last Name  </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$lastName.'</td>
		 </tr>';
	 }
	 if($companyName!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> Company Name  </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$companyName.'</td>
		 </tr>';
	 }
	 if($email!=""){
		 $var.='<tr valign="top">
		  <td width="35%" align="right" valign="top" class="borderdotted form-txt">E-Mail Address </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$email.'</td>
		 </tr>';
	 }
	 if($phone!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> Telephone Number  : </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$phone.'</td>
		 </tr>';
	 }
	 if($fax!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> Fax Number  : </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$fax.'</td>
		 </tr>';
	 }
	 if($address!=""){
		 $var.='<tr valign="top">
		  <td width="35%" align="right" valign="middle" class="borderdotted form-txt">Street Address </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$address.'</td>
		 </tr>';
	 }
	 if($city!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> City  </td>
		  <td align="center">&rarr;</td>
			<td align="left" valign="middle" class=" borderdotted">'.$city.'</td>
		 </tr>';
	 }
	 if($state!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> State  </td>
		  <td align="center">&rarr;</td>
			<td align="left" valign="middle" class=" borderdotted">'.$state.'</td>
		 </tr>';
	 }
	 if($zipcode!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt"> Post code  </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$zipcode.'</td>
		 </tr>';
	 }
	 if($country!=""){
		 $var.='<tr valign="top">
		  <td align="right" valign="middle" class="borderdotted form-txt">Country  </td>
		  <td align="center">&rarr;</td>
		  <td align="left" valign="middle" class=" borderdotted">'.$country.'</td>
		 </tr>';
	 }
	 if($comments!=""){
		 $var.='<tr class="content_justify">
		  <td align="right"> Comments :</td>
		  <td align="center">&rarr;</td>
		  <td align="left">'.nl2br($comments).'</td>
		 </tr>';
	 }
	$var.='</table>';
	return $var;
}

function addEditMember2($memID="", $AddEdit="") {

	$memberRes=getResult("member_tbl"," where memberID='$memID'");

	if($memberRes[memberID]!="") {

		@extract($memberRes);

		$form_heading="Add/Edit Company Profile";

		$button="Update Company Profile";

		$width="100%";
?>
	  <div class="my-folder-right">
      <div class="my-folder-right-box-full">
        <h2>Contact Details</h2>
		<form name="company_contact_form" method="post" enctype="multipart/form-data" action="" onsubmit="return validate_contact_profile_form();">
		<?php
	   if (!empty($_SESSION[message])) {
		   ?>
		   <div align="center"><br/><strong><? show_message_front();?></strong></div>
		   <?
	   }
	   ?>
		<div class="company-detail-tr">
          <div class="company-detail-left">Email Id</div>
          <div class="company-detail-right">
          <label id="lbl_email3"><div id="a1" class="tbp tbm10" style="display:none">
   <div class="tool-tip" align="left">Please Enter your <strong>Email Id</strong></div>
</div>
<input id="designation" name="email" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a1');desig();" onFocus="javascript:ntt('q3','a1');" tabindex="4" placeholder="" value="<?=$email;?>"></input>

<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Registered Office Address</div>
          <div class="company-detail-right">
        <div id="a2" class="tbp tbm10" style="display:none">
    <div class="tool-tip" align="left">Please Enter your <strong>Postal Address</strong></div>
</div>
 <textarea name="address" maxlength="300" onBlur="nhid('a2');address2();" onFocus="javascript:ntt('q6','a2');"><?=$address;?></textarea>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">City</div>
          <div class="company-detail-right">
        <div id="a3" class="tbp tbm10" style="display:none">
    <div class="tool-tip" align="left">Please Enter your <strong>City</strong></div>
</div>
<input name="city" type="text" onBlur="nhid('a3');address2();" onFocus="javascript:ntt('q6','a3');" value="<?=$city;?>" ></input>
          </div></div>
		   <div class="company-detail-tr">
          <div class="company-detail-left">Postal/Pin Code</div>
          <div class="company-detail-right">
        <div id="a10" class="tbp tbm10" style="display:none">
    <div class="tool-tip" align="left">Toot Tip text goes here</b></div>
</div>
<input name="zipcode" type="text" onBlur="nhid('a10');address2();" onFocus="javascript:ntt('q6','a10');" value="<?=$zipcode;?>"></input>
          </div></div>
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">State</div>
          <div class="company-detail-right">
        <div id="a4" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>State</strong></div>
</div>
<input name="state" type="text" onBlur="nhid('a4');address2();" onFocus="javascript:ntt('q6','a4');" value="<?=$state;?>"></input>
          </div></div>
		  
		   
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Country</div>
          <div class="company-detail-right">
        <div id="a5" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Toot Tip text goes here</b></div>
</div>
<?=country("country",$country,"265px;");?>
          </div></div>
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Phone No.</div>
          <div class="company-detail-right">
        <div id="a6" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Enter ISD Code</b></div>
</div>
<div id="a12" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter STD Code</b></div>
</div>
<div id="a13" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Phone No.</b></div>
</div>
 <?
//$phone=explode('/',$phone);
?>
<input  style="width:9% !important; margin-right:5px;"  name="countryCodePhone" type="text" onBlur="nhid('a6');address2();" onFocus="javascript:ntt('q6','a6');" value="<?=$countryCodePhone;?>"></input>

<input  style="width:9% !important; margin-right:5px;" name="areaCodePhone" type="text" onBlur="nhid('a12');address2();" onFocus="javascript:ntt('q6','a12');" value="<?=$areaCodePhone;?>"></input>

<input style="width:37% !important;" name="phone" type="text" onBlur="nhid('a13');address2();" onFocus="javascript:ntt('q6','a13');" value="<?=$phone;?>"></input>
 

     </div></div>
		  <!--<div class="company-detail-tr">
          <div class="company-detail-left">Alternate Phone No.</div>
          <div class="company-detail-right">
        <div id="a18" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Enter ISD Code</b></div>
</div>
<div id="a19" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter STD Code</b></div>
</div>
<div id="a20" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Phone No.</b></div>
</div>
<input  style="width:9% !important; margin-right:5px;"  type="text" onBlur="nhid('a18');address2();" onFocus="javascript:ntt('q6','a18');" ></input>

<input  style="width:9% !important; margin-right:5px;" type="text" onBlur="nhid('a19');address2();" onFocus="javascript:ntt('q6','a19');" ></input>

<input style="width:37% !important;"  type="text" onBlur="nhid('a20');address2();" onFocus="javascript:ntt('q6','a20');" ></input>
          </div></div>
		  
		  
		  -->
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Mobile No.</div>
          <div class="company-detail-right">
        <div id="a7" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Country Code</div>
</div>
<div id="a14" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Mobile No.</div>
</div>
<input style="width:9% !important; margin-right:5px;"  name="countryCodemobile" type="text" onBlur="nhid('a7');address2();" onFocus="javascript:ntt('q6','a7');" value="<?=$countryCodePhone;?>"></input>
<input  style="width:49% !important; margin-right:5px;"  name="mobile" type="text" onBlur="nhid('a14');address2();" onFocus="javascript:ntt('q6','a14');"  value="<?=$mobileNo;?>"></input>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Alternate Mobile No.</div>
          <div class="company-detail-right">
        <div id="a16" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Country Code</div>
</div>
<div id="a17" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Mobile No.</div>
</div>
<input style="width:9% !important; margin-right:5px;" name="countryCodemobile" type="text" onBlur="nhid('a16');address2();" onFocus="javascript:ntt('q6','a16');" value="<?=$countryCodePhone;?>"></input>
<input  style="width:49% !important; margin-right:5px;" name="mobile2" type="text" onBlur="nhid('a17');address2();" onFocus="javascript:ntt('q6','a17');" value="<?=$mobileNo2;?>"></input>
          </div></div>
		  
		  
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Fax</div>
          <div class="company-detail-right">
        <div id="a8" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Toot Tip text goes here</b></div>
</div>
<input name="fax" type="text" onBlur="nhid('a8');address2();" onFocus="javascript:ntt('q6','a8');" value="<?=$fax;?>"></input>
          </div></div>
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Alternate Email</div>
          <div class="company-detail-right">
        <div id="a10" class="tbp tbm10" style="display:none">
    <div class="tool-tip" align="left">Toot Tip text goes here</b></div>
</div>
<input name="alternateEmail" type="text" onBlur="nhid('a10');address2();" onFocus="javascript:ntt('q6','a10');" value="<?=$alternateEmail;?>"></input>
          </div></div>
		
		   
	 <!--contact details:ends-->  
	<div class="company-detail-tr">
          <div class="company-detail-left"></div>
		  

	      <input name="action_register" type="hidden" value="save" />

	      <input name="memID" type="hidden" value="<?=$memberRes[memberID]?>" />
        
		  <input name="submit" type="submit" class="save" id="submit" value="Save Changes" />
		  </div>
		  </form>
   </div>
	<script language="javascript" type="text/javascript" src="js/ls-v-5.js"></script><script type="text/javascript">
		function stopRKey(evt) {
		var evt = (evt) ? evt : ((event) ? event : null);
		var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

		if ((evt.keyCode == 13) &&  (node.type=="password")) 
		{
			$("#submt1").click();
			return false;
		}
		}
		document.onkeypress = stopRKey;
		</script>
      </div>
<?php
}
}

function addEditMember1($memID="", $AddEdit="") {

	$memberRes=getResult("member_tbl"," where memberID='$memID'");

	if($memberRes[memberID]!="") {

		@extract($memberRes);

		$form_heading="Add/Edit Company Profile";

		$button="Update Company Profile";

		$width="100%";
		?>
		<div class="my-folder-right">
      
      
      <div class="my-folder-right-box-full">
        <h2>Edit Company Profile</h2>
		<form name="company_member_form" method="post" enctype="multipart/form-data" action="" >
		 <?php

	   if (!empty($_SESSION[message])) {

		   ?>

		   <div align="center"><br/><strong><? show_message_front();?></strong></div>

		   <?

	   }

	   ?>
		
		<div class="company-detail-tr">
		<div class="company-detail-left">Company Name</div>
          <div class="company-detail-right">
            <label ><div id="a1" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>Company Name</strong></div>

</div>
<input id="designation" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a1');desig();" onFocus="javascript:ntt('q3','a1');" tabindex="4" placeholder="" name="companyName" value="<?=$companyName;?>"></input>



<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div>
		  
		  	<div class="company-detail-left">Company Logo</div>
          <div class="company-detail-right">
            <label ><div id="a1" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>Company Logo</strong></div>

</div>
<input id="designation"  type="file"  placeholder="" name="companyLogo" > <img src="<?=SITE_URL_PATH;?>/uploaded_files/company_logos/<?=$memberRes[companyLogo]?>" style="vertical-align: middle;max-height:34px;max-width:34px;" id="gl_img" border="0"></input>

</label>
          </div>
		  
          <div class="company-detail-left">Contact Person</div>
          <div class="company-detail-right">
            <label ><div id="a20" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>Contact Person Name</strong></div>

</div>
<input id="designation" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a20');desig();" onFocus="javascript:ntt('q3','a20');" tabindex="4" placeholder="" name="cp" value="<?=$memberRes[memberName];?>"></input>

<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">CEO Name</div>
          <div class="company-detail-right">
            <label ><div id="a2" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>CEO Name</strong></div>

</div>
<input id="designation" name="ownerName" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a2');desig();" onFocus="javascript:ntt('q3','a2');" tabindex="4" placeholder="" value="<?=$memberRes[ownerName];?>"></input>

<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Ownership Type</div>
          <div class="company-detail-right">
            <label ><div id="a3" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">For Example : PVT LTD,LTD,ORG,NGO,Govt etc </strong></div>

</div>
<!--<input id="designation" name="ownershipType" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a3');desig();" onFocus="javascript:ntt('q3','a3');" tabindex="4" placeholder="" value="<?=$memberRes[ownershipType];?>"></input>
-->
<select name="ownershipType">
<option>Select Ownership Type</option>
<option value="1" <?php if($memberRes[ownershipType]=='1') { echo "selected"; } ?>>Sole Proprietorship</option>
<option value="2" <?php if($memberRes[ownershipType]=='2') { echo "selected"; } ?>>Partnership</option>
<option value="3" <?php if($memberRes[ownershipType]=='3') { echo "selected"; } ?>>Private Limited</option>
<option value="4" <?php if($memberRes[ownershipType]=='4') { echo "selected"; } ?>>Public Limited</option>
<option value="5" <?php if($memberRes[ownershipType]=='5') { echo "selected"; } ?>>NGO/Organization/Trust</option>
</select>


<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Year of establishment</div>
          <div class="company-detail-right">
            <label ><div id="a4" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">For Example : 1985
</div>

</div>
<input id="designation" name="yoe" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a4');desig();" onFocus="javascript:ntt('q3','a4');" tabindex="4" placeholder="" value="<?=$yoe;?>"></input>

<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Major MARKET</div>
          <div class="company-detail-right">
            <label ><div id="a5" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">For Example : USA,Australia,UK,China,India,<br>
Singapore etc </div>

</div>
<input id="designation" name="mainMarket" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a5');desig();" onFocus="javascript:ntt('q3','a5');" tabindex="4" placeholder="" value="<?=$mainMarket;?>"></input>

<span id="d1" class="em mt5" style="display:none"></span>

<span id="d1a" class="em mt5" style="display:none"></span></label>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">NO. of Employees</div>
          <div class="company-detail-right">
        <div id="a5" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Toot Tip text goes here</b></div>

</div>
<select name="companySize" id="NOBLANK~Please Select Country~DM~">
<option value="">----- Please Select No. of Employees -----</option>
 <?
	       foreach($GLOBALS[company_size_array] as $key => $val) {

		       $sel="";

		       if ($companySize==$key) {

			       $sel='selected="selected"';

		       }

		       ?><option value="<?=$key;?>" <?=$sel;?>><?=$val;?></option><?

	       }

	      ?>

              </select>
          </div></div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">Turnover</div>
          <div class="company-detail-right">
        <div id="a2" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>Postal Address</strong></div>

</div>

        <select  name="annualTurnover" id="select">
          <option value="">----- Select Company Turnover -----</option>
           <?

	       	       foreach($GLOBALS[annual_turnover_array] as $key => $val) {

		       $sel="";

		       if ($annualTurnover==$key) {

			       $sel='selected="selected"';

		       }

		       ?>

		       <option value="<?=$key;?>" <?=$sel;?>>INR <?=$val;?> </option><?

	       }

	       ?>
                        </select>
          </div></div>
		  
		  
		  
		  <div class="company-detail-tr">
          <div class="company-detail-left">Nature Of Business</div>
          <div class="company-detail-right">
        <div id="a3" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>City</strong></div>

</div>
        <!--<input name="radiobutton" type="radio" value="radiobutton" style="width:20px; margin-right:10px;">      Buyer  
        </input><input name="radiobutton" type="radio" value="radiobutton" style="width:20px; margin-right:10px;">      Supplier 
        </input><input name="radiobutton" type="radio" value="radiobutton" style="width:20px; margin-right:10px;">      Buyer /Supplier 
        </input>-->
		<table width="100%"><tr><? foreach($GLOBALS[business_nature_array] as $key => $val) {

		      $sel="";

		      if ($businessNature==$key) {

			      $sel='checked="checked"';

		      }

		      ?><td><input type="radio" name="businessNature" value="<?=$key;?> "<?=$sel;?> style="width:15px;"><?=$val;?></td><?

	      }?></tr></table>
          </div>
		  </div>
		  
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Business Types</div>
          <div class="company-detail-right">
        <div id="a4" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter your <strong>State</strong></div>

</div>
 <p> <table width="100%" border="0" cellspacing="0" cellpadding="1">

              <?php

              $counter=0;

              $businesstype=explode('^',$businessType);

                     foreach($GLOBALS[business_type_array] as $key => $value) {

	              if ($counter == 0) {

		              ?>

		              <tr>

		              <?php

	              }

	              $chk="";

	              

	              if (in_array($key,$businesstype)) {

		              $chk='checked="checked"';

	              }

	              ?>

	              <td><input type="checkbox" name="businessType[]" id="businessType" value="<?=$key;?>" <?=$chk;?> style="width:20px;"/><?=$value;?></td>

	              

	              <?php

	              $counter++;

	              if ($counter == 2) {

		              ?>

		              </tr>

		              <?php

		              $counter=0;

	              }	              

              }

              if ($counter == 1) {

	              ?>

	              <td>&nbsp;</td>

	              </tr>

	              <?php

              }

              ?>

             </table></p>
          </div>
		   </div>
		  
		  
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Products/Services We Offer<br>
(Company Details)</div>
          <div class="company-detail-right">
        <div id="a8" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Your Company Details</b></div>

</div>
        <textarea name="companyDescription" rows="5" onFocus="javascript:ntt('q6','a8');" onBlur="nhid('a8');address2();"><?=$companyDescription;?></textarea>
          </div></div>
		  
		  
		  
		   <div class="company-detail-tr">
          <div class="company-detail-left">Import Products/Services<br>
 (Want to Buy) </div>
          <div class="company-detail-right">
        <div id="a6" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Enter ISD Code</b></div>

</div>
<div id="a12" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter STD Code</b></div>

</div>
<div id="a9" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter What you want to buy</b></div>

</div>
</input>
<textarea name="importDescription" rows="5" onFocus="javascript:ntt('q6','a9');" onBlur="nhid('a9');address2();"><?=$offertobuy;?></textarea>
</input>
</input>
          </div>
		   </div>
		  <div class="company-detail-tr">
          <div class="company-detail-left">About Company </div>
          <div class="company-detail-right">
        <div id="a18" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Enter ISD Code</b></div>

</div>
<div id="a19" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter STD Code</b></div>

</div>
<div id="a10" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter About Company</b></div>

</div>
</input>
<textarea name="aboutDescription" rows="5" onFocus="javascript:ntt('q6','a10');" onBlur="nhid('a10');address2();"><?=$aboutUs;?></textarea>
</input>
</input>
          </div>
		  </div>
		  
		   <!--<div class="company-detail-tr">
          <div class="company-detail-left">Website</div>
          <div class="company-detail-right">
        <div id="a11" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Your Website</b></div>

</div>
<input type="text" name="website" onBlur="nhid('a11');address2();" onFocus="javascript:ntt('q6','a11');" value="<?=$website;?>"></input>

          </div></div>-->
		  
		   <!--contact details:ends-->
<div class="company-detail-tr">
          <div class="company-detail-left"></div>
		    <input name="action_register" type="hidden" value="save" />

	      <input name="memID" type="hidden" value="<?=$memberRes[memberID]?>" />
          
		  <input name="submit" type="submit" class="save" id="submit" value="Save Changes" />

   </div>
	
       </form>

      </div>
  </div>
		<?php
}
}

function addEditMember($memID="", $AddEdit="") {

	$memberRes=getResult("member_tbl"," where memberID='$memID'");

	if($memberRes[memberID]!="") {

		@extract($memberRes);

		$form_heading="Add/Edit Company Profile";

		$button="Update Company Profile";

		$width="100%";

		

		/*if($officeImage!="") {

			$filenm1=SITE_DIR_PATH."/uploaded_files/office_images/".$officeImage;

			if(file_exists($filenm1)) {

				$dimens=GetImageSize($filenm1);

				if($dimens[0]>130) {

					$dimens[0]=$dimens[0]+50;

					$dimens[1]=$dimens[1]+80;

				}

				else{

					$d	imens[0]=200;

					$dimens[1]=200;

				}

				$image_link='&nbsp;<a href="javascript:void(0);" onClick="openwin(\''.SITE_URL_PATH.'/popup.php?img=office_images/'.$officeImage.'\', \''.$dimens[0].'\', \''.$dimens[1].'\')" class="red"><b>View Office Picture</b></a>';

			}

		}*/

		

		if($companyLogo!="") {

			$filenm1=SITE_DIR_PATH."/uploaded_files/company_logos/".$companyLogo;

			if(file_exists($filenm1)) {

				$dimens=GetImageSize($filenm1);

				if($dimens[0]>130) {

					$dimens[0]=$dimens[0]+50;

					$dimens[1]=$dimens[1]+80;

				}

				else{

					$dimens[0]=200;

					$dimens[1]=200;

				}

				$logo_link='&nbsp;<a href="javascript:void(0);" onClick="openwin(\''.SITE_URL_PATH.'/popup.php?img=company_logos/'.$companyLogo.'\', \''.$dimens[0].'\', \''.$dimens[1].'\')" class="red"><b>View Logo</b></a>';

			}

		}		

		

		/*if($companyVideo!="") {

			$video_link='&nbsp;<a onClick="window.open(\''.SITE_URL_PATH.'/view_video.php?video_name='.$companyVideo.'\',\'royale\', \'toolbar=no,width=450,height=340,left=275,top=225, screenX=250,screenY=150,status=no,scrollbars=no, resizable=no,\');return false" href="javascript:void(0);"><img src="'.SITE_URL_PATH.'/images/video-icon.gif" alt="View Video" border="0" /></a>';

		}*/

	}

	else {

		@extract($_SESSION);

		@extract($_REQUEST);

		$form_heading="Join Free";

		$button="Register Now";

		$width="97%";

	}

	?>

	<script type="text/javascript" src="'.SITE_ADMIN_URL.'/fckeditor/fckeditor.js"></script>

	<form name="company_member_form" method="post" enctype="multipart/form-data" action="" onsubmit="return validate_company_profile_form();">

	<br>

	  <p>

	   <?php

	   if (!empty($_SESSION[message])) {

		   ?>

		   <div align="center"><br/><strong><? show_message_front();?></strong></div>

		   <?

	   }

	   ?>

	   <div align="right"><span class="red-style">*</span> fields are mandatory.</div>

	  </p>

	 <br>

<div class="p5px large" id="userInfo" style="background:#F7F7F7;">

<table width="100%" cellpadding="7">

<tr>

<td width="25%" class="ar b" valign="top"><b class="star">*</b> Company Name <b>:</b></td>

<td>

<div class="pr">

<p><input name="companyName" maxlength="200" type="text" class="a_f f_n ml8" style="width:260px;" value="<?=$companyName;?>" /></p>

<div id="txtHint"  align="left" style="font-size: 12px;font-weight: bold;color:#FF3300"> </div>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top" id="text_pass2_id">Company Logo <b>:</b></td>

<td>

<div class="pr">

<p class="showTips showError"><input name="companyLogo" type="file" class="a_f f_n ml8" style="width:265px;" /><?=$logo_link;?></p>

<p class="pt5px gray" style="font-style:italic;">Image Size: Please upload square image for better view. Width=200px and Height=60px for better display</p>

<?/*if ($memberRes[memberID] != "" && $memberRes['membershipType'] < 2) {

		    $var.='<tr>

		     <td align="right" class="b">Video : </td>

		     <td align="left"><input name="companyVideo" type="file" class="txtbox"  style="width:260px;"/>'.$video_link.'</td>

		    </tr>';

	    }

	    else {

		    $var.='<input type="hidden" name="companyVideo" value="" />';

	    }*/?>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"><b class="star">*</b>Owner/CEO Name <b>:</b></td>

<td>

<div class="pr">

<p><input name="ownerName" maxlength="200" type="text" class="a_f f_n ml8" style="width:260px;" value="<?=$ownerName;?>" /></p>

<p class="pt5px gray" style="font-style:italic;">For Example : Sl-452 </p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Ownership Type  <b>:</b></td>

<td>

<div class="pr">

<p><input name="ownershipType" maxlength="50" type="text" class="a_f f_n ml8" style="width:140px;" value="<?=$ownershipType;?>" /></p>

<p class="pt5px gray" style="font-style:italic;">For Example : PVT LTD,LTD,ORG,NGO,Govt etc </p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Year of Establishment  <b>:</b></td>

<td>

<div class="pr">

<p><input name="yoe" type="text" maxlength="4" class="a_f f_n ml8" style="width:140px;" value="<?=$yoe;?>" /></p>

<p class="pt5px gray" style="font-style:italic;">For Example : 1985 </p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Major Markets   <b>:</b></td>

<td>

<div class="pr">

<p><input name="mainMarket" maxlength="200" type="text" class="a_f f_n ml8" style="width:300px;" value="<?=$mainMarket;?>" /></p>

<p class="pt5px gray" style="font-style:italic;">(Limit 200 Char) For Example : USA,Australia,UK,China,India,Singapore etc </p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> No. of Employees  <b>:</b></td>

<td>

<div class="pr">

<p><select name="companySize" size="1" class="a_f f_n ml8" style="width:265px;">

<?

	       foreach($GLOBALS[company_size_array] as $key => $val) {

		       $sel="";

		       if ($companySize==$key) {

			       $sel='selected="selected"';

		       }

		       ?><option value="<?=$key;?>" <?=$sel;?>><?=$val;?></option><?

	       }

	      ?></select></p>



</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Turnover  <b>:</b></td>

<td>

<div class="pr">

<p> <select name="annualTurnover" size="1" style="width:265px;">

	       <option value="" selected="selected">----- Select Company Turnover -----</option>

	       <?

	       	       foreach($GLOBALS[annual_turnover_array] as $key => $val) {

		       $sel="";

		       if ($annualTurnover==$key) {

			       $sel='selected="selected"';

		       }

		       ?>

		       <option value="<?=$key;?>" <?=$sel;?>><?=$val;?> USD</option><?

	       }

	       ?>

	      </select></p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"><b class="star">*</b> Nature of Business  <b>:</b></td>

<td>

<div class="pr">

<p> <? foreach($GLOBALS[business_nature_array] as $key => $val) {

		      $sel="";

		      if ($businessNature==$key) {

			      $sel='checked="checked"';

		      }

		      ?><input type="radio" name="businessNature" value="<?=$key;?> "<?=$sel;?>><?=$val;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?

	      }?></p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"><b class="star">*</b> Business Types <b>:</b></td>

<td>

<div class="pr">

<p> <table width="100%" border="0" cellspacing="0" cellpadding="1">

              <?php

              $counter=0;

              $businesstype=explode('^',$businessType);

              

                     foreach($GLOBALS[business_type_array] as $key => $value) {

	              if ($counter == 0) {

		              ?>

		              <tr>

		              <?php

	              }

	              $chk="";

	              

	              if (in_array($key,$businesstype)) {

		              $chk='checked="checked"';

	              }

	              ?>

	              <td width="50%"><input type="checkbox" name="businessType[]" id="businessType" value="<?=$key;?>" <?=$chk;?> /><?=$value;?></td>

	              

	              <?php

	              $counter++;

	              if ($counter == 2) {

		              ?>

		              </tr>

		              <?php

		              $counter=0;

	              }	              

              }

              if ($counter == 1) {

	              ?>

	              <td>&nbsp;</td>

	              </tr>

	              <?php

              }

              ?>

             </table></p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top" id="text_pass2_id"><b class="star">*</b>Products/Services we offers (Company Details) <b>:</b></td>

<td>

<div class="pr">

<p>

<textarea name="companyDescription" style="width:350px;" rows="10" class="a_f f_n ml8" onkeyup="return validate_company_description_chars_left();" onblur="return validate_company_description_chars_left();"><?=$companyDescription;?></textarea><!--<span class="star">*</span><br/> <input type="text" name="company_description_chars_total" id="company_description_chars_total" value="'.strlen($companyDescription).'" style="width:25px;" /> total characters ... &nbsp;<input type="text" name="about_self_chars_left" id="company_description_chars_left" value="" style="width:25px;" /> characters left ...--></p>

<p class="pt5px gray" style="font-style:italic;">Provide Products and Services Deatils like Products 1,Products 2,Products 3</p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top" id="text_pass2_id">Import Products/Services (Want to Buy) <b>:</b></td>

<td>

<div class="pr">

<p>

<textarea name="importDescription" maxlength="300" style="width:350px;" rows="6" class="a_f f_n ml8"><?=$offertobuy;?></textarea></p>



<p class="pt5px gray" style="font-style:italic;">(Max Char="200") Import Products/Services (Want to Buy)</p>

</div>

</td>

</tr>



<tr>

<td class="ar b" valign="top" id="text_pass2_id">About Company  <b>:</b></td>

<td>

<div class="pr">

<p>

<textarea name="aboutDescription" style="width:350px;" maxlength="1000" rows="10" class="a_f f_n ml8"><?=$aboutUs;?></textarea></p>



<p class="pt5px gray" style="font-style:italic;">( Max Char : 1000 Char) Describe about your company</p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top"> Website  <b>:</b></td>

<td>

<div class="pr">

<p><input name="website" maxlength="50" type="text" class="a_f f_n ml8" style="width:140px;" value="<?=$website;?>" /></p>

<p class="pt5px gray" style="font-style:italic;">For Example : www.mycmpanyname.com </p>

</div>

</td>

</tr>

<tr>

<td class="ar b" valign="top" id="text_pass2_id"><b></b></td>

<td>

<div class="pr">

<p>

<input name="submit" type="submit" class="button" id="submit" value="<?=$button;?>" />

	      <input name="action_register" type="hidden" value="save" />

	      <input name="memID" type="hidden" value="<?=$memberRes[memberID]?>" />

</div>

</td>

</tr>

</form>

</table>

</div>

<?

/*$var='<script type="text/javascript" src="'.SITE_ADMIN_URL.'/fckeditor/fckeditor.js"></script>

	<form name="register_member_form" method="post" enctype="multipart/form-data" action="'.SITE_URL_PATH.'/register.htm" style="display:inline;" onsubmit="return validate_register_member_form();">

	<p class="ar fs11 pr20"><span class="star">*</span> fields are mandatory.</p>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">

	 <tr>

	  <td width="74%">';

	  

	   if($memberRes[memberID]=="") {

		   $var.='

		   <table width="100%" border="0" cellspacing="0" cellpadding="3">

		    <tr>

		     <td align="right" class="b">&nbsp;</td>

		     <td align="left" class="fs14 b black">Login Information</td>

		    </tr>

		    <tr>

		     <td width="40%" align="right" class="b">Email Address : </td>

		     <td width="60%" align="left"><input name="email" type="text" class="txtbox"  style="width:260px;" value="'.$email.'" /><span class="star">*</span></td>

		    </tr>

		    <tr>

		     <td align="right" class="b">Password : </td>

		     <td align="left"><input name="pwd" type="password" class="txtbox"  style="width:260px;" value="'.$pwd.'" /><span class="star">* 5-digit at least (a-z, A-Z, 0-9)</span></td>

		    </tr>

		    <tr>

		     <td align="right" class="b">Re-Enter Password : </td>

		     <td align="left"><input name="cpwd" type="password" class="txtbox" style="width:260px;" value="'.$cpwd.'" /><span class="star">*</span></td>

		    </tr>

		   </table>';

	   }

	   else {

	

		   

  	   $var.='<input type="hidden" name="email" value="'.$email.'" />

		   <input type="hidden" name="pwd" value="'.$pwd.'" />

		   <input type="hidden" name="cpwd" value="'.$pwd.'" />';

	   }

	   

	   $var.='<table width="100%" border="0" cellspacing="0" cellpadding="3" class="mt18">

	    <tr>

	     <td align="right" class="b">&nbsp;</td>

	     <td align="left" class="fs14 b black">Personal Information</td>

	    </tr>

	    <tr>

	     <td width="40%" align="right" class="b">Your Name : </td>

	     <td width="60%" align="left">

	      <select name="nameTitle" class="textbox" id="nameTitle">';

	      

	       for ($i=0;$i<count($GLOBALS[title_array]);$i++) {

		       $sel="";

		       if ($nameTitle==$GLOBALS[title_array][$i]) {

			       $sel='selected="selected"';

		       }

		       $var.='<option value="'.$GLOBALS[title_array][$i].'" '.$sel.'>'.$GLOBALS[title_array][$i].'</option>';

	       }

	      $var.='</select>

	      <input name="memberName" type="text" class="textbox" style="width:200px;" value="'.$memberName.'" /><span class="star">*</span>

	      

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Company Name : </td>

	     <td align="left"><input name="companyName" type="text" class="textbox" style="width:260px;" value="'.$companyName.'" /><span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Your Designation : </td>

	     <td align="left"><input name="jobTitle" type="text" class="txtbox"  style="width:260px;" value="'.$jobTitle.'" /></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Registered Office Address :</td>

	     <td align="left"><textarea name="address" rows="3" class="txtbox" style="width:260px;">'.$address.'</textarea><span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">City : </td>

	     <td align="left"><input name="city" type="text" class="txtbox"  style="width:260px;" value="'.$city.'" /><span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">State : </td>

	     <td align="left"><input name="state" type="text" class="txtbox"  style="width:260px;" value="'.$state.'" /></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Zip/Postal Code : </td>

	     <td align="left"><input name="zipcode" type="text" class="txtbox"  style="width:260px;" value="'.$zipcode.'" /></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Country : </td>

	     <td align="left">'.country("country",$country,"265px;").'</td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Phone No. : </td>

	     <td align="left">

	      <table cellspacing="0" cellpadding="0" class="fs11">

	       <tr>

	        <td width="25%">Country Code</td>

	        <td width="25%">Area Code</td>

	        <td width="50%">Office   Number</td>

	       </tr>

	       <tr>

	        <td class="pr5"><input name="countryCodePhone" type="text" class="textbox" style="width:70px;" value="'.$countryCodePhone.'" /></td>

	        <td><input name="areaCodePhone" type="text" class="textbox" style="width:70px;" value="'.$areaCodePhone.'" /></td>

	        <td><input name="phone" type="text" class="textbox" style="width:95px;" value="'.$phone.'" /></td>

	       </tr>

	      </table>

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Fax No. : </td>

	     <td align="left">

	      <table cellspacing="0" cellpadding="0" class="fs11">

	       <tr>

	        <td width="25%">Country Code</td>

	        <td width="25%">Area Code</td>

	        <td width="50%">Number</td>

	       </tr>

	       <tr>

	        <td class="pr5"><input name="countryCodeFax" type="text" class="textbox" style="width:70px;" value="'.$countryCodeFax.'" /></td>

	        <td><input name="areaCodeFax" type="text" class="textbox" style="width:70px;" value="'.$areaCodeFax.'" /></td>

	        <td><input name="fax" type="text" class="textbox" style="width:95px;" value="'.$fax.'" /></td>

	       </tr>

	      </table>

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Mobile No. : </td>

	     <td align="left"><input name="mobileNo" type="text" class="txtbox"  style="width:260px;" value="'.$mobileNo.'" /><span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Alternate Email ID : </td>

	     <td align="left"><input name="alternateEmail" type="text" class="txtbox"  style="width:260px;" value="'.$alternateEmail.'" /></td>

	    </tr>

	   </table>

	   

	   <table width="100%" border="0" cellspacing="0" cellpadding="3" class="mt18">

	    <tr>

	     <td align="right" class="b">&nbsp;</td>

	     <td align="left" class="fs14 b black">Company Business Profile</td>

	    </tr>

	    <tr>

	     <td width="40%" align="right" class="b">Name of CEO/Owner : </td>

	     <td width="60%" align="left"><input name="ownerName" type="text" class="txtbox"  style="width:260px;" value="'.$ownerName.'" /><span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Office Picture (only 1) : </td>

	     <td align="left"><input name="officeImage" type="file" class="txtbox"  style="width:260px;" />'.$image_link.'<br/>Please upload square image (300x300 or above) for better display.</td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Ownership Type : </td>

	     <td align="left"><input name="ownershipType" type="text" class="txtbox"  style="width:260px;" value="'.$ownershipType.'" /></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Year of Establishment :</td>

	     <td align="left"><input name="yoe" type="text" maxlength=4 class="txtbox"  style="width:260px;" value="'.$yoe.'" /><span class="star fs11">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Certificate (Quality Control) : </td>

	     <td align="left"><input name="certification" type="text" class="txtbox"  style="width:260px;" value="'.$certification.'" /></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Main Market : </td>

	     <td align="left"><input name="mainMarket" type="text" class="txtbox"  style="width:260px;" value="'.$mainMarket.'" /><span class="star">*</span></td>

	    </tr>';

	    

	    if ($memberRes[memberID] != "" && $memberRes['membershipType'] < 3) {

		    $var.='<tr>

		     <td align="right" class="b">Logo : </td>

		     <td align="left"><input name="companyLogo" type="file" class="txtbox"  style="width:260px;" />'.$logo_link.'<br/>Logo Size: Width=200px and Height=60px for better display.</td>

		    </tr>';

	    }

	    else {

		    $var.='<input type="hidden" name="companyLogo" value="" />';

	    }

	    

	    if ($memberRes[memberID] != "" && $memberRes['membershipType'] < 2) {

		    $var.='<tr>

		     <td align="right" class="b">Video : </td>

		     <td align="left"><input name="companyVideo" type="file" class="txtbox"  style="width:260px;"/>'.$video_link.'</td>

		    </tr>';

	    }

	    else {

		    $var.='<input type="hidden" name="companyVideo" value="" />';

	    }

	    

	    

	    $var.='<tr>

	     <td align="right" class="b">No. of Employees : </td>

	     <td align="left">

	      <select name="companySize" size="1" style="width:265px;">';

	       foreach($GLOBALS[company_size_array] as $key => $val) {

		       $sel="";

		       if ($companySize==$key) {

			       $sel='selected="selected"';

		       }

		       $var.='<option value="'.$key.'" '.$sel.'>'.$val.'</option>';

	       }

	      $var.='</select>

	      <span class="star">*</span>

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Turnover : </td>

	     <td align="left">

	      <select name="annualTurnover" size="1" style="width:265px;">

	       <option value="" selected="selected">----- Select Company Turnover -----</option>';

	       foreach($GLOBALS[annual_turnover_array] as $key => $val) {

		       $sel="";

		       if ($annualTurnover==$key) {

			       $sel='selected="selected"';

		       }

		       $var.='<option value="'.$key.'" '.$sel.'>'.$val.'</option>';

	       }

	      $var.='</select>&nbsp;'.CURRENCY.'

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Business Country : </td>

	     <td align="left">'.country("businessCountry",$businessCountry,"265px;").'<span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Business Nature : </td>

	     <td align="left">';

	      foreach($GLOBALS[business_nature_array] as $key => $val) {

		      $sel="";

		      if ($businessNature==$key) {

			      $sel='checked="checked"';

		      }

		      $var.='<input type="radio" name="businessNature" value="'.$key.'" '.$sel.'>'.$val.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

	      }

	      $var.='<span class="star">*</span>

	     </td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Select Category  : </td>

	     <td align="left">'.getListingCategoriesDropDownAjax("mainCategory",$mainCategory,"265").'<span class="star">*</span></td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Select Sub Category  : </td>

	     <td align="left"><span id="showSubCategories">';

	      if ($mainCategory != "") {

		      $var.=getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265");

		      $var.='<span class="star">*</span></span>';

	      }

	      $var.='</span>';

	     $var.='</td>

	    </tr>

	    <tr>

	     <td align="right" class="b">Company Description : </td>

	     <td align="left"><textarea name="companyDescription" rows="8" class="txtbox" style="width:260px;" onkeyup="return validate_company_description_chars_left();" onblur="return validate_company_description_chars_left();">'.$companyDescription.'</textarea><span class="star">*</span><br/><input type="text" name="company_description_chars_total" id="company_description_chars_total" value="'.strlen($companyDescription).'" style="width:25px;" /> total characters ... &nbsp;<input type="text" name="about_self_chars_left" id="company_description_chars_left" value="" style="width:25px;" /> characters left ...</td>

	    </tr>';

	    

	    if ($memberRes[memberID] != "") {

		    $var.='<tr>

		    <td align="right" class="b">About Us : </td>

		    <td align="left"><textarea name="aboutUs" rows="8" class="txtbox" style="width:260px;">'.$aboutUs.'</textarea></td>

		   </tr>

		   <tr>

		    <td align="right" class="b">Contact Us : </td>

		    <td align="left"><textarea name="contactUs" rows="8" class="txtbox" style="width:260px;">'.$contactUs.'</textarea></td>

		   </tr>';

	    }

	    

	    $var.='<tr>

	     <td align="right" class="b">Website Address : </td>

	     <td align="left"><input name="website" type="text" class="txtbox"  style="width:260px;" value="'.$website.'" /></td>

	    </tr>';

	    

	    if($memberRes[memberID]=="") {

		    $var.='<tr>

		     <td align="right"><strong>Verification Code :</strong></td>

		     <td align="left">

		      <table width="100%" cellspacing="0" cellpadding="0">

		       <tr><td><input name="security_code" type="text" class="textbox" size="25" />&nbsp; <img src="'.SITE_URL_PATH.'/CaptchaSecurityImages.php?width=100&height=25&characters=5" /><span class="star">*</span><br/>Please type in the characters that appear in the image box</span></td></tr>

		      </table>

		     </td>

		    </tr>

		    <tr><td colspan="2" align="center" style="padding:10px 0;"><strong>Before proceeding registration, please read the <a class="link3" onclick="window.open(\'terms_popup.htm\',\'royale\', \'toolbar=no,width=650,height=600,left=20,top=20, screenX=250,screenY=150,status=no,scrollbars=yes, resizable=yes,\');return false" href="javascript:void();">Terms of Use</a> carefully.</strong><br /><input type="checkbox" value="Y" name="terms" /><strong>YES</strong>, I have read and agreed the Terms of Use.</td></tr>';

	    }

	    else {

		    $var.='<input type="hidden" name="security_code" value="pankaj" />

		    <input type="hidden" name="terms" value="Y" />';

	    }

	    

	    $var.='<tr>

	     <td align="right">&nbsp;</td>

	     <td align="left">

	      <input name="submit" type="submit" class="button" id="submit" value="'.$button.'" />

	      <input name="action_register" type="hidden" value="save" />

	      <input name="memID" type="hidden" value="'.$memberRes[memberID].'" />

	     </td>

	    </tr>

	   </table>

	  </td>';

	  

	  if($memberRes[memberID]=="") {

		  $var.='<td width="26%" valign="top"><img src="'.SITE_URL_PATH.'/images/register-img.jpg" alt="" /></td>';

	  }

	  else {

		  $var.='<td width="10%" valign="top">&nbsp;</td>';

	  }

	 $var.='</tr>

	</table>

	</form>';

	if ($memberRes[memberID] != "") {

		$var.='<script type="text/javascript">

		var oFCKeditor = new FCKeditor("aboutUs");

		oFCKeditor.BasePath = "'.SITE_ADMIN_URL.'/fckeditor/";

		oFCKeditor.ToolbarSet="Basic";

		oFCKeditor.Height="200";

		oFCKeditor.Width="270";

		oFCKeditor.ReplaceTextarea() ;

		

		var oFCKeditor1 = new FCKeditor("contactUs");

		oFCKeditor1.BasePath = "'.SITE_ADMIN_URL.'/fckeditor/";

		oFCKeditor1.ToolbarSet="Basic";

		oFCKeditor1.Height="200";

		oFCKeditor1.Width="270";

		oFCKeditor1.ReplaceTextarea() ;

		</script>';

	}

	

	return $var;

	*/

}



function addEditMemberAdmin($memID) {
	$res=getResult("member_tbl"," where memberID='$memID'");	
	@extract($res);
	$form_heading="Edit Member Details";
	$button="Update Member Details";			
	/*
	$var='<form name="register_member_form" method="post" enctype="multipart/form-data" action="'.SITE_ADMIN_URL.'/manage_members.htm" style="display:inline;" onsubmit="return validate_register_member_form();">
	<input type="hidden" name="email" value="'.$email.'" />
	<input type="hidden" name="pwd" value="'.$pwd.'" />
	<input type="hidden" name="cpwd" value="'.$pwd.'" />
	<input type="hidden" name="companyLogo" value="" />
	<input type="hidden" name="companyVideo" value="" />
	<input type="hidden" name="security_code" value="prembansal" />
	<input type="hidden" name="terms" value="Y" />	
	<p class="ar fs11 pr20"><span class="star">*</span> fields are mandatory.</p>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	 <tr>
	  <td width="74%">
	   <table width="100%" border="0" cellspacing="0" cellpadding="3" class="mt18">
	    <tr>
	     <td align="right" class="b">&nbsp;</td>
	     <td align="left" class="fs14 b black">Personal Information</td>
	    </tr>
	    <tr>
	     <td width="40%" align="right" class="b">Your Name : </td>
	     <td width="60%" align="left">
	      <select name="nameTitle" class="textbox" id="nameTitle">';
	      
	       for ($i=0;$i<count($GLOBALS[title_array]);$i++) {
		       $sel="";
		       if ($nameTitle==$GLOBALS[title_array][$i]) {
			       $sel='selected="selected"';
		       }
		       $var.='<option value="'.$GLOBALS[title_array][$i].'" '.$sel.'>'.$GLOBALS[title_array][$i].'</option>';
	       }
	      $var.='</select>
	      <input name="memberName" type="text" class="textbox" style="width:200px;" value="'.$memberName.'" /><span class="star">*</span>
	      
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Company Name : </td>
	     <td align="left"><input name="companyName" type="text" class="textbox" style="width:260px;" value="'.$companyName.'" /><span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Your Designation : </td>
	     <td align="left"><input name="jobTitle" type="text" class="txtbox"  style="width:260px;" value="'.$jobTitle.'" /></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Registered Office Address :</td>
	     <td align="left"><textarea name="address" rows="3" class="txtbox" style="width:260px;">'.$address.'</textarea><span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">City : </td>
	     <td align="left"><input name="city" type="text" class="txtbox"  style="width:260px;" value="'.$city.'" /><span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">State : </td>
	     <td align="left"><input name="state" type="text" class="txtbox"  style="width:260px;" value="'.$state.'" /></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Zip/Postal Code : </td>
	     <td align="left"><input name="zipcode" type="text" class="txtbox"  style="width:260px;" value="'.$zipcode.'" /></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Country : </td>
	     <td align="left">'.country("country",$country,"265px;").'</td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Phone No. : </td>
	     <td align="left">
	      <table cellspacing="0" cellpadding="0" class="fs11">
	       <tr>
	        <td width="25%">Country Code</td>
	        <td width="25%">Area Code</td>
	        <td width="50%">Office   Number</td>
	       </tr>
	       <tr>
	        <td class="pr5"><input name="countryCodePhone" type="text" class="textbox" style="width:70px;" value="'.$countryCodePhone.'" /></td>
	        <td><input name="areaCodePhone" type="text" class="textbox" style="width:70px;" value="'.$areaCodePhone.'" /></td>
	        <td><input name="phone" type="text" class="textbox" style="width:95px;" value="'.$phone.'" /></td>
	       </tr>
	      </table>
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Fax No. : </td>
	     <td align="left">
	      <table cellspacing="0" cellpadding="0" class="fs11">
	       <tr>
	        <td width="25%">Country Code</td>
	        <td width="25%">Area Code</td>
	        <td width="50%">Number</td>
	       </tr>
	       <tr>
	        <td class="pr5"><input name="countryCodeFax" type="text" class="textbox" style="width:70px;" value="'.$countryCodeFax.'" /></td>
	        <td><input name="areaCodeFax" type="text" class="textbox" style="width:70px;" value="'.$areaCodeFax.'" /></td>
	        <td><input name="fax" type="text" class="textbox" style="width:95px;" value="'.$fax.'" /></td>
	       </tr>
	      </table>
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Mobile No. : </td>
	     <td align="left"><input name="mobileNo" type="text" class="txtbox"  style="width:260px;" value="'.$mobileNo.'" /><span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Alternate Email Id : </td>
	     <td align="left"><input name="alternateEmail" type="text" class="txtbox"  style="width:260px;" value="'.$alternateEmail.'" /></td>
	    </tr>
	   </table>
	   
	   <table width="100%" border="0" cellspacing="0" cellpadding="3" class="mt18">
	    <tr>
	     <td align="right" class="b">&nbsp;</td>
	     <td align="left" class="fs14 b black">Company Business Profile</td>
	    </tr>
	    <tr>
	     <td width="40%" align="right" class="b">Name of CEO/Owner : </td>
	     <td width="60%" align="left"><input name="ownerName" type="text" class="txtbox"  style="width:260px;" value="'.$ownerName.'" /><span class="star">*</span></td>
	    </tr>
	    <!--
	    <tr>
	     <td align="right" class="b">Office Picture (only 1) : </td>
	     <td align="left"><input name="officeImage" type="file" class="txtbox"  style="width:260px;" />'.$image_link.'</td>
	    </tr>
	    !-->
	    <tr>
	     <td align="right" class="b">Ownership Type : </td>
	     <td align="left"><input name="ownershipType" type="text" class="txtbox"  style="width:260px;" value="'.$ownershipType.'" /></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Year of Establishment :</td>
	     <td align="left"><input name="yoe" type="text" class="txtbox"  style="width:260px;" value="'.$yoe.'" /><span class="star fs11">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Certificate (quality control) : </td>
	     <td align="left"><input name="certification" type="text" class="txtbox"  style="width:260px;" value="'.$certification.'" /></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Main Market : </td>
	     <td align="left"><input name="mainMarket" type="text" class="txtbox"  style="width:260px;" value="'.$mainMarket.'" /><span class="star">*</span></td>
	    </tr>
	    <!--
	    <tr>
	     <td align="right" class="b">Logo : </td>
	     <td align="left"><input name="companyLogo" type="file" class="txtbox"  style="width:260px;" />'.$logo_link.'</td>
	    </tr>	    
	    <tr>
	     <td align="right" class="b">Video : </td>
	     <td align="left"><input name="companyVideo" type="text" class="txtbox"  style="width:260px;"/></td>
	    </tr>
	    !-->
	    
	    <tr>
	     <td align="right" class="b">No. of Employees : </td>
	     <td align="left">
	      <select name="companySize" size="1" style="width:265px;">';
	       foreach($GLOBALS[company_size_array] as $key => $val) {
		       $sel="";
		       if ($companySize==$key) {
			       $sel='selected="selected"';
		       }
		       $var.='<option value="'.$key.'" '.$sel.'>'.$val.'</option>';
	       }
	      $var.='</select>
	      <span class="star">*</span>
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Turnover : </td>
	     <td align="left">
	      <select name="annualTurnover" size="1" style="width:265px;">
	       <option value="" selected="selected">----- Select Company Turnover -----</option>';
	       foreach($GLOBALS[annual_turnover_array] as $key => $val) {
		       $sel="";
		       if ($annualTurnover==$key) {
			       $sel='selected="selected"';
		       }
		       $var.='<option value="'.$key.'" '.$sel.'>'.$val.'</option>';
	       }
	      $var.='</select>
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Business Country : </td>
	     <td align="left">'.country("businessCountry",$businessCountry,"265px;").'<span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Business Nature : </td>
	     <td align="left">';
	      foreach($GLOBALS[business_nature_array] as $key => $val) {
		      $sel="";
		      if ($businessNature==$key) {
			      $sel='checked="checked"';
		      }
		      $var.='<input type="radio" name="businessNature" value="'.$key.'" '.$sel.'>'.$val.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	      }
	      $var.='<span class="star">*</span>
	     </td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Select Category  : </td>
	     <td align="left">'.getListingCategoriesDropDownAjax("mainCategory",$mainCategory,"265").'<span class="star">*</span></td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Select Sub Category  : </td>
	     <td align="left"><span id="showSubCategories">';
	      if ($mainCategory != "") {
		      $var.=getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265");
		      $var.='<span class="star">*</span></span>';
	      }
	      $var.='</span>';
	     $var.='</td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Company Description : </td>
	     <td align="left"><textarea name="companyDescription" rows="8" class="txtbox" style="width:260px;" onkeyup="return validate_company_description_chars_left();" onblur="return validate_company_description_chars_left();">'.$companyDescription.'</textarea><span class="star">*</span><br/><input type="text" name="company_description_chars_total" id="company_description_chars_total" value="'.strlen($companyDescription).'" style="width:25px;" /> total characters ... &nbsp;<input type="text" name="about_self_chars_left" id="company_description_chars_left" value="" style="width:25px;" /> characters left ...</td>
	    </tr>
	    <tr>
	     <td align="right" class="b">Website Address : </td>
	     <td align="left"><input name="website" type="text" class="txtbox"  style="width:260px;" value="'.$website.'" /></td>
	    </tr>
	    
	    <tr>
	     <td align="right">&nbsp;</td>
	     <td align="left">
	      <input name="submit" type="submit" class="button" id="submit" value="'.$button.'" />
	      <input name="action_register" type="hidden" value="save" />
	      <input name="memID" type="hidden" value="'.$res[memberID].'" />
	     </td>
	    </tr>
	   </table>
	  </td>
	  <td width="26%" valign="top"><img src="'.SITE_URL_PATH.'/images/register-img.jpg" alt="" /></td>
	 </tr>
	</table>
	</form>';	
	
	return $var;
	*/
}


function addEditTradeLead($slno="", $membershipType="") {
	if ($slno) {
		$res=getResult("trade_leads_tbl"," where slno='$slno'");
		@extract($res);
		$action_type="Update Trade Lead";
	}
	else {
		@extract($_POST);
		$action_type="Post Trade Lead";
	}
	if($image1!="") {
		$filenm1=SITE_DIR_PATH."/uploaded_files/trade_lead_images/".$image1;
		if(file_exists($filenm1)) {
			$dimens=GetImageSize($filenm1);
			if($dimens[0]>130) {
				$dimens[0]=$dimens[0]+50;
				$dimens[1]=$dimens[1]+80;
			}
			else{
				$dimens[0]=200;
				$dimens[1]=200;
			}
			$image_link1="&nbsp;<a href=\"javascript:void(0);\" onClick=\"openwin('".SITE_URL_PATH."/popup.php?img=trade_lead_images/".$image1."', '$dimens[0]', '$dimens[1]')\" class=\"red\"><b>View Image</b></a>";
		}
	}	
	?>
	
	<form action="" name="post_trade_lead" method="post" enctype="multipart/form-data" onsubmit="return validate_post_trade_lead()">
	<table width="100%" cellpadding="3" cellspacing="0">
	 <tr>
	  <td colspan="2" align="left" valign="top">
	   <?php
	   if (!empty($_SESSION[message])) {
		   ?>
		   <div align="center"><br/><strong><? show_message_front();?></strong></div>
		   <?
	   }
	   ?>
	   <div align="right"><span class="red-style">*</span> fields are mandatory.</div>
	  </td>
	 </tr>
	 <tr valign="top">
	  <td width="35%" align="right" ><span class="red-style">*</span> Select Category :</td>
	  <td width="65%" align="left"><? echo getListingCategoriesDropDownAjax("mainCategory",$mainCategory,"265"); ?></td>
	 </tr>
	 <tr valign="top">
	  <td align="right"></td>
	  <td align="left"><span id="showSubCategories"><? if ($industryType) { echo getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265"); } ?></td>
	 </tr> 
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Offer Type : </td>
	  <td align="left">
	   <select name="leadType" class="textbox" id="leadType">
	    <?
	    foreach($GLOBALS[offer_type_array] as $key => $val) {
		    if ($leadType==$key) {
			    $sel='selected="selected"';
		    }
		    else {
			    $sel="";
		    }
		    echo '<option value="'.$key.'" '.$sel.'>'.$val.'</option>';
	    }
	    ?>
	   </select>
	  </td>
	 </tr>
	 <tr>
	  <td align="right"><span class="red-style">*</span> Title  :</td>
	  <td align="left"><input name="leadTitle" type="text" class="textbox" style="width:260px;" value="<?=$leadTitle;?>" /></td>
	 </tr>
	 <tr>
	  <td align="right" valign="top"><span class="red-style">*</span> Description :</td>
	  <td align="left"><textarea name="leadDescription" style="width:260px;" rows="5" class="textbox"><?=$leadDescription;?></textarea></td>
	 </tr>
	 <?php
	 if ($membershipType < 4) {
		 ?>
		 <tr>
		  <td align="right" valign="top">Upload Image :</td>
		  <td align="left"><input name="image1" type="file" class="textbox" style="width:265px;" /><?=$image_link1;?></td>
		 </tr>
		 <?php
	 }
	 ?>
		 
	 <tr>
	  <td align="right">Expires On :</td>
	  <td align="left"><input name="expiryDate" type="text" class="textbox" id="expiryDate" size="18" value="<?=$expiryDate;?>" readonly="readonly" />&nbsp;<a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.post_trade_lead.expiryDate);return false;" ><img src="js/calendar1/themes/Normal/calbtn.gif" alt="" border="0" style="vertical-align:inherit;" /></a></span></td>
	 </tr>
	 <tr>
	  <td align="right">&nbsp;</td>
	  <td align="left">
	   <input name="submit" type="submit" class="button" value="<?=$action_type;?>" />
	   <input name="reset" type="reset" class="button" value="Reset" />
	   <input type="hidden" name="action" value="Post" />         
	  </td>
	 </tr>
	</table>
	</form>
	<iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="js/calendar1/themes/Normal/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;"></iframe>
	<?
}
function addEditProductnew($productID="", $membershipType="") {
	if ($productID) {
		$productRes=getResult("product_tbl"," where productID='$productID'");
		@extract($productRes);
		$action_type="Update  Details";
$memID=getMember();
	}
	else {
		@extract($_POST);
		
		$action_type="Submit";
	}
	if($image1!="") {
		$filenm1=SITE_DIR_PATH."/uploaded_files/product_images/".$image1;
		if(file_exists($filenm1)) {
			$dimens=GetImageSize($filenm1);
			if($dimens[0]>130) {
				$dimens[0]=$dimens[0]+50;
				$dimens[1]=$dimens[1]+80;
			}
			else{
				$dimens[0]=200;
				$dimens[1]=200;
			}
			$image_link1="&nbsp;<a href=\"javascript:void(0);\" onClick=\"openwin('".SITE_URL_PATH."/popup.php?img=product_images/".$image1."', '$dimens[0]', '$dimens[1]')\" class=\"red\"><b>View Image</b></a>";
		}
	}
	?>

<div class="my-folder-right" >
 <?php
	   if (!empty($_SESSION[message])) {
		   ?>
		   <div align="center"><br/><strong><? show_message_front();?></strong></div>
		   <?
	   }
	   ?>
        <div class="my-folder-right-box-full">

          <h2><?=$page_title;?></h2>
		  
<!--		  
<div id="img_form1"  class="brouse-image" align="center" style="height:175px;width:175px">   
   <IFRAME FRAMESPACING="0" FRAMEBORDER="0" HEIGHT="173" WIDTH="175" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="NO" src="upfile.php" class="mt5"></IFRAME>
</div>
-->	<form action="" name="add_new_product_form" method="post" enctype="multipart/form-data" onsubmit="return validate_add_new_product_form();">





			 <div class="company-detail-tr">
  <div class="company-detail-left">Name *</div>
   <div class="company-detail-right">
  <div id="a1" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Name</div>
</div>
              <div class="company-detail-right">
              <input id="designation" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a1');desig();" onFocus="javascript:ntt('q3','a1');" tabindex="4" placeholder="" name="productName" value="<?=$productName;?>"></input></div>
              </div></div>
			  
			  <script type="text/javascript">
			  function create_new() {
		_ImOverlaymodalnew.open({content: '<form name="add_grp_form" id="add_grp_form"><div class="boxgroup" style="top: -20px; opacity: 1; left: -221px;" ><div class="txtlabel" ><span>Please enter new Group Name</span><input type="text" value="" name="new_group_name" id="new_group_name" maxlength="100" class="a_f pf1"/></div><span><input type="button" id="createnewgroup" class="createboxbutton createboxcolenable" name="createnewgroup" value="Create"></span><span  id="loading1" style="display:none;"><img border="0" width="16" height="11" alt="" src="http://my.imimg.com/gifs-new/loading.gif"></span></div><input type="hidden" name="action" value="addnewgroup"><input type="hidden" name="pcid" id="pcid" value="3123766"></form>'});
		document.getElementById("new_group_name").focus();	
		}	
		function stopRKey(evt) {
		var evt = (evt) ? evt : ((event) ? event : null);
		var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);	
		if ((evt.keyCode == 13))
			{
				if(document.getElementById("createnewgroup")){
				document.getElementById("createnewgroup").click();
				return false;
				}
			}
		}
		document.onkeypress = stopRKey;	
		</script>
			 <div class="company-detail-tr">
  <div class="company-detail-left">Group *</div>
   <div class="company-detail-right">
  <div id="a1" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Product Group</div>
</div>
      <div class="company-detail-right">
	  <select >
	  <?php
	  $gsql=mysql_query("select * from group_tbl where group_memid='$memID' and group_type='1'");
	  while($gres=mysql_fetch_array($gsql))
	  {
	  ?>
	  <option value="<?php echo $gres['group_id'];?>"><?php echo ucwords($gres['group_name']);?></option>
	  <?php
	  }
	  ?>
	  <ul>
			<li href="javascript:void(0);" onclick="return create_new();" style="text-align:left;font-size:14px;padding:6px;background-color:#ffffff;border:1px solid #EBEBEB;"><strong>+</strong>&nbsp;Create New Group</li>  
			</ul>
	  </select>
              
			
			  </div>
              </div></div>
			  
			  
		<div class="company-detail-tr">
              <div class="company-detail-left"> Image</div>
              <div class="company-detail-right">
              <input id="designation" class=" rf ui-autocomplete-input" type="file" onBlur="nhid('a5');desig();" onFocus="javascript:ntt('q3','a5');" tabindex="4" placeholder="" name="image1"></input></div>
			 <?
            if (strstr($_SERVER['SCRIPT_NAME'],"add-product")) {
	        ?>
	        <div class="company-detail-tr">
	          <div class="company-detail-left">Category *</div>
              <div class="company-detail-right">
              
			  <?=getListingCategoriesDropDownAjax1("mainCategory",$mainCategory,"265");?> </div></div>
			
              <div class="company-detail-tr">
	          <div class="company-detail-left">Sub Category</div>
             <span id="showSubCategories"><?php if ($industryType) { echo getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265"); } ?>
			  </div>
		     <?
	 }
     if (strstr($_SERVER['SCRIPT_NAME'],"add-service")) {
	 ?>
	 <div class="company-detail-tr">
	          <div class="company-detail-left">Category *</div>
              <div class="company-detail-right">
              
			  <?=getListingCategoriesDropDownAjax2("mainCategory",$mainCategory,"265");?> </div></div>
			
              <div class="company-detail-tr">
	          <div class="company-detail-left">Sub Category</div>
             <span id="showSubCategories"><?php if ($industryType) { echo getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265"); } ?>
			  </div>
			  <?
			  }
			  if (strstr($_SERVER['SCRIPT_NAME'],"add-course")) {
			  ?>
			   <div class="company-detail-tr">
	          <div class="company-detail-left">Category *</div>
              <div class="company-detail-right">
              
			  <?=getListingCategoriesDropDownAjax2("mainCategory",$mainCategory,"265");?> </div></div>
			
              <div class="company-detail-tr">
	          <div class="company-detail-left">Sub Category</div>
             <span id="showSubCategories"><?php if ($industryType) { echo getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265"); } ?>
			  </div>
			  <?php } ?>
			<div class="company-detail-tr">
              <div class="company-detail-left">Keyword *</div>
              <div class="company-detail-right">
			   <div id="a2" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Keyword</div>
</div>
              <div class="company-detail-right">
              <input id="designation" class=" rf ui-autocomplete-input" type="text" onBlur="nhid('a2');desig();" onFocus="javascript:ntt('q3','a2');" tabindex="4" placeholder="" name="keyword" value="<?=$keyword;?>"></input></div></div>
			   <div class="company-detail-tr">
	        <div class="company-detail-left">Description *</div>
            <div class="company-detail-right">
              <div class="company-detail-right">
			   <div id="a3" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Description</div>
</div>
              <textarea name="completeDescription" rows="5" onFocus="javascript:ntt('q6','a3');" onBlur="nhid('a3');address2();"><?=$completeDescription;?></textarea>
            </div>
          </div>
              </div><div class="company-detail-tr">
			   <?
            if (strstr($_SERVER['SCRIPT_NAME'],"add-product")) {
	        ?>
                <div class="company-detail-left">Availability</div>
				
                <div class="company-detail-right">
                    
                    <select name="availability" >
					<option value="">----- Please Select Availibility -----</option>
	    <option value="Y" <?php if ($availability == "Y") { echo 'selected="selected"'; } ?>>Yes</option>
	    <option value="N" <?php if ($availability == "N") { echo 'selected="selected"'; } ?>>No</option>
	   </select>
                </div>
          </div></div>
	      <div class="cb"></div>
	      <div class="break"></div>
    <div class="company-detail-tr tac subject enquiry">
      Other Specification      </div>
	  
			   <div id="a4" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Price</div>
</div>
	      <div class="company-detail-tr">
	        <div class="company-detail-left">Price</div>
			
            <div class="company-detail-right">
              <label></label>
              <input name="productPrice" type="text" class=" rf ui-autocomplete-input" id="text" tabindex="4" onFocus="javascript:ntt('q3','a4');" onBlur="nhid('a4');desig();" placeholder="" value="<?=$productPrice;?>">
            </div>
          </div>
	      <div class="company-detail-tr">
	        <div class="company-detail-left">Discounted Price </div>
			 <div class="company-detail-right">
			   <div id="a5" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Discounted Price</div>
</div>
            <div class="company-detail-right">
              <label>
              <input name="discountedPrice" type="text" class=" rf ui-autocomplete-input" id="text2" tabindex="4" onFocus="javascript:ntt('q3','a5');" onBlur="nhid('a5');desig();" placeholder="" value="<?=$discountedPrice;?>">
              </label>
            </div>
          </div>
	      <div class="company-detail-tr">
	        <div class="company-detail-left">Minimum Order . </div>
			
			 <div class="company-detail-right">
			   <div id="a6" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Minimum Order</div>
</div>
            <div class="company-detail-right">
              <label>
              <input name="minimumOrder" type="text" class=" rf ui-autocomplete-input" id="text3" tabindex="4" onFocus="javascript:ntt('q3','a6');" onBlur="nhid('a6');desig();" placeholder="" value="<?=$minimumOrder;?>">
              </label>
            </div>
          </div>
	      <div class="company-detail-tr">
	        <div class="company-detail-left">Payment Terms  </div>
            
			 <div class="company-detail-right">
			   <div id="a7" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Payment Terms </div>
</div>
            <div class="company-detail-right">
              <label></label>
              <input name="paymentTerms" type="text" class=" rf ui-autocomplete-input" id="text32" tabindex="4" onFocus="javascript:ntt('q3','a7');" onBlur="nhid('a7');desig();" placeholder="" value="<?=$paymentTerms;?>">
            </div>
          </div>
	      <div class="company-detail-tr">
	        <div class="company-detail-left">Brand Name </div>
			 <div class="company-detail-right">
			   <div id="a8" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Brand Name </div>
</div>
            <div class="company-detail-right">
              <label></label>
              <input name="brandName" type="text" class=" rf ui-autocomplete-input" id="text33" tabindex="4" onFocus="javascript:ntt('q3','a8');" onBlur="nhid('a8');desig();" placeholder="" value="<?=$brandName;?>">
            </div>
          </div>
		      
		  <div class="company-detail-tr">
		    <div class="company-detail-left">Delivery Time. </div>
			 <div class="company-detail-right">
			   <div id="a9" class="tbp tbm10" style="display:none">

    <div class="tool-tip" align="left">Please Enter Delivery Time </div>
</div>
            <div class="company-detail-right">
             
              <input name="deliveryTime" type="text" class=" rf ui-autocomplete-input" id="text34" tabindex="4" onFocus="javascript:ntt('q3','a9');" onBlur="nhid('a9');desig();" placeholder="" <?=$completeDescription;?>>
            </div>
          </div>
		  <?php
		  }
		  ?>
	      <div class="company-detail-tr">
	      <div class="company-detail-left"></div>
        <input type="hidden" name="action_product" value="save" />   
		<input name="submit" type="submit" class="save" id="submit" value="Save Changes" />
      </div></div></form> 
	  <?php
	  }

function addEditProduct($productID="", $membershipType="") {
	if ($productID) {
		$productRes=getResult("product_tbl"," where productID='$productID'");
		@extract($productRes);
		$action_type="Update  Details";
	}
	else {
		@extract($_POST);
		
		$action_type="Submit";
	}
	if($image1!="") {
		$filenm1=SITE_DIR_PATH."/uploaded_files/product_images/".$image1;
		if(file_exists($filenm1)) {
			$dimens=GetImageSize($filenm1);
			if($dimens[0]>130) {
				$dimens[0]=$dimens[0]+50;
				$dimens[1]=$dimens[1]+80;
			}
			else{
				$dimens[0]=200;
				$dimens[1]=200;
			}
			$image_link1="&nbsp;<a href=\"javascript:void(0);\" onClick=\"openwin('".SITE_URL_PATH."/popup.php?img=product_images/".$image1."', '$dimens[0]', '$dimens[1]')\" class=\"red\"><b>View Image</b></a>";
		}
	}
	?>

	<form action="" name="add_new_product_form" method="post" enctype="multipart/form-data" onsubmit="return validate_add_new_product_form();">
	<table width="100%" cellpadding="3" cellspacing="0">
	 <tr>
	  <td colspan="2" align="left" valign="top">
	   <?php
	   if (!empty($_SESSION[message])) {
		   ?>
		   <div align="center"><br/><strong><? show_message_front();?></strong></div>
		   <?
	   }
	   ?>
	   <div align="right"><span class="red-style">*</span> fields are mandatory.</div>
	  </td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> <?=$proname;?> Name :</td>
	  <td align="left"><input name="productName" type="text" class="textbox" style="width:260px;" value="<?=$productName;?>" /></td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> <?=$proname;?> Code :</td>
	  <td align="left"><input name="productCode" type="text" class="textbox" style="width:260px;" value="<?=$productCode;?>" /></td>
	 </tr>
	 <tr>
	  <td align="right" valign="top"><?=$proname;?> Photo :</td>
	  <td align="left"><input name="image1" type="file" class="textbox" style="width:265px;" /><?=$image_link1;?><br/>Image Size: Please upload square image for better view. </td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Keyword :</td>
	  <td align="left"><input name="keyword" type="text" class="textbox" style="width:260px;" value="<?=$keyword;?>" /></td>
	 </tr>
	 <tr valign="top">
	  <td width="35%" align="right" ><span class="red-style">*</span> Select Category :</td>
	  <td width="65%" align="left"><?=getListingCategoriesDropDownAjax("mainCategory",$mainCategory,"265");?></td>
	 </tr>
	 <tr valign="top">
	  <td align="right"></td>
	  <td align="left"><span id="showSubCategories"><?php if ($industryType) { echo getListingSubCategoriesDropDown("industryType", $mainCategory, $industryType, "265"); } ?></td>
	 </tr> 
	 <?
    if (strstr($_SERVER['SCRIPT_NAME'],"add_new_product")) {
	 ?>
	 
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Price :</td>
	  <td align="left"><input name="productPrice" type="text" class="textbox" style="width:260px;" value="<?=$productPrice;?>" />&nbsp;<?=CURRENCY;?></td>
	 </tr>
	 <tr valign="top">
	  <td align="right" >Discounted Price :</td>
	  <td align="left"><input name="discountedPrice" type="text" class="textbox" style="width:260px;" value="<?=$discountedPrice;?>" />&nbsp;<?=CURRENCY;?></td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Minimum Order :</td>
	  <td align="left"><input name="minimumOrder" type="text" class="textbox" style="width:260px;" value="<?=$minimumOrder;?>" /></td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Payment Terms :</td>
	  <td align="left"><input name="paymentTerms" type="text" class="textbox" style="width:260px;" value="<?=$paymentTerms;?>" /></td>
	 </tr>
	 <tr valign="top">
	  <td align="right" ><span class="red-style">*</span> Availability :</td>
	  <td align="left">
	   <select name="availability" size="1">
	    <option value="Y" <?php if ($availability == "Y") { echo 'selected="selected"'; } ?>>Yes</option>
	    <option value="N" <?php if ($availability == "N") { echo 'selected="selected"'; } ?>>No</option>
	   </select>
	  </td>
	 </tr>
	 <tr valign="top">
	  <td align="right">Brand Name :</td>
	  <td align="left"><input name="brandName" type="text" class="textbox" style="width:260px;" value="<?=$brandName;?>" /></td>
	 </tr>
	 <tr>
	  <td align="right">Model  :</td>
	  <td align="left"><input name="modelType" type="text" class="textbox" style="width:260px;" value="<?=$modelType;?>" /></td>
	 </tr>
	 <tr>
	  <td align="right"><span class="red-style">*</span> Delivery Time  :</td>
	  <td align="left"><input name="deliveryTime" type="text" class="textbox" style="width:260px;" value="<?=$deliveryTime;?>" /></td>
	 </tr>
	 <?
 }
 ?>
	 <tr>
	  <td align="right" valign="top"><span class="red-style">*</span> Description :</td>
	  <td align="left"><textarea name="completeDescription" style="width:260px;" rows="5" class="textbox"><?=$completeDescription;?></textarea></td>
	 </tr>
	 <tr>
	  <td align="right">&nbsp;</td>
	  <td align="left">
	   <input name="submit" type="submit" class="button" value="<?=$action_type;?>" />
	   <?php
	   if (empty($productID)) {
		   ?>
		   <input name="reset" type="reset" class="button" value="Reset" />
		   <?php
	   }
	   ?>
	   <input type="hidden" name="action_product" value="save" />         
	  </td>
	 </tr>
	</table>
	</form>
	<?php
}


function categoryNavigation($catid, $link="") {
	if ($link=="") {
		$link=$_SERVER['PHP_SELF'];
	}
	$res=getResult("category_tbl"," where catID='$catid' and status='Y' order by catName");
	$flag=0;
	$catparent=$catid;
	while($flag!=1) {
		$record=getResult("category_tbl"," where catID='$catparent' and status='Y' order by catName");
		if($record['parentID']!=0) {
			$catparent=$record[parentID];
			$array.="$record[catID]~";
		}else{
			if($record['catID']!="") {
				$array="$record[catID]~";
			}
			$flag=1;
		}
	}
	$arr=explode("~",$array);
	$result = array_reverse($arr);
	if ($link=="companies") {
		$var="<a href='".SITE_URL_PATH."/companies-directory.htm' class='link'>All Categories</a> &raquo; ";
	}
	else {
		$var="<a href='".SITE_URL_PATH."/products-directory.htm' class='link'>All Categories</a> &raquo; ";
	}
	for($i=1;$i<count($result);$i++) {
		$res=getResult("category_tbl"," where catID='$result[$i]'  and status='Y'");
		if ($i < count($result)-1) {
			$var.="<a href='".SITE_URL_PATH."/".$link."/".$res['catID']."/".getValidFileName($res[catName]).".htm'>".ucwords($res[catName])."</a> &raquo; ";
		}
		else {
			$var.=ucwords($res['catName']);
		}
	}
	return $var;
}


function categoriesDisplay($category_id, $cat_name, $link) {
	
	  $catCnt=getCount("category_tbl"," where parentID='$category_id' and status='Y'");
	  $qry=db_query("select * from category_tbl where parentID='$category_id' and status='Y' order by catOrder");
	  if ($catCnt > 0) {
		  ?>
		  <p class="cb">&nbsp;</p><br />
	<div class="bg2 p10">
	 
	 <table width="100%" border="0" cellspacing="0" cellpadding="3" class="sub-cate mt11">
	 <?
		  
		  $count=0;
		  while ($res=mysql_fetch_array($qry)) {
			  $res=ms_htmlentities_decode($res);
			  if ($count=="0") {
				  ?>
				  <tr>
				  <?php
			  }
			  ?>
			  <td width="33%" valign="top"><a href="<?=SITE_URL_PATH;?>/<?=$link;?>/<?=$res['catID'];?>/<?=GetValidFileName($res[catName]);?>.htm"><?=ucwords($res[catName]);?></a></td>
			  <?php
			  $count++;
			  if ($count=="3") {
				  $count=0;
				  ?>
				  </tr>
				  <?php
			  }
		  }
		  if ($count < 3 && $count != 0) {
			  while ($count < 3) {
				  ?>
				  <td width="33%" valign="top">&nbsp;</td>
				  <?php
				  $count++;
			  }
		  }
		   ?>
		  
		 
	 </table>
	</div>
	
	
	<?php
	  }
	  else {
		 
	  }
	
}


function productCountriesDisplay($category_id, $cat_name, $link, $cond="") {
	if ($category_id > 0) {
		$qry_str="&category_id=".$category_id;
	}	
	?>

	<div class="mt11">
	 <p class="bg-boxtc"><img src="<?=SITE_URL_PATH;?>/images/box-tr.jpg" alt="" class="fr" /><img src="<?=SITE_URL_PATH;?>/images/box-tl.jpg" alt="" /></p>
	 <div class="bg-box p5">
	  <p class="b fs13 mb10">Refine Search By Region:</p>
	  
	  <ul class="discountry">
	   <?php
	   $count=0;
	   $regionQry=db_query("select mt.country, count(pt.productID) from member_tbl as mt, product_tbl as pt where pt.memberID=mt.memberID and pt.status='Y'".$cond." group by mt.country");
	   while ($regionRes=mysql_fetch_array($regionQry)) {
		   if ($count == 0) {
			   ?>
			   <li>
			   <?php
		   }
		   ?>
		   <span width="33%" class="bg-strip-color1">
		    <?php
		    $countryRes=getResult("country_tbl"," where countryName='".$regionRes['country']."'","countryFlag");
		    if ($countryRes['countryFlag'] != "") {
			    $filenm=SITE_DIR_PATH."/uploaded_files/flags/".$countryRes['countryFlag'];
			    if(file_exists($filenm)) {
				    $filenm1=SITE_URL_PATH."/uploaded_files/flags/".$countryRes['countryFlag'];
				    ?>
				    <img src="<?=$filenm1;?>" alt="" width="20" height="13" />
				    <?php
			    }
		    }
		    ?>
		    <a class="link" href="<?=$link;?>?region=<?=$regionRes[0];?><?=$qry_str;?>"><?=$regionRes[0];?> (<?=$regionRes[1];?>)</a>
		   </span>
		   <?php
	   }
	   $count++;
	   if ($count == 3) {
		   $count=0;
		   ?>
		   </li>
		   <?php
	   }
	   if ($count < 3 && $count != 0) {
		   while ($count < 3) {
			   ?>
			   </span>
			   <?php
			   $count++;
		   }
		   ?>
		   </li>
		   <?php
	   }
	   ?>
<div style="clear:both;"></div>
	  </ul>
      	 </div>
      	 
	   <div style="clear:both;"></div>
	 <p class="bg-boxbc"><img src="<?=SITE_URL_PATH;?>/images/box-br.jpg" alt="" class="fr" /><img src="<?=SITE_URL_PATH;?>/images/box-bl.jpg" alt="" /></p>
	</div>
	<?php
}


function tradeLeadsCountriesDisplay($leadType, $category_id, $cat_name, $link, $cond="") {
	if ($category_id > 0) {
		$qry_str="&category_id=".$category_id;
	}
	?>
	<div class="mt11">
	 <p class="bg-boxtc"><img src="<?=SITE_URL_PATH;?>/images/box-tr.jpg" alt="" class="fr" /><img src="<?=SITE_URL_PATH;?>/images/box-tl.jpg" alt="" /></p>
	 <div class="bg-box p5">
	  <p class="b fs13 mb10">Refine Search By Region:</p>
	  <ul class="black discountry">
	   <?php
	   $count=0;
	   $regionQry=db_query("select mt.country, count(tl.slno) from member_tbl as mt, trade_leads_tbl as tl where tl.memberID=mt.memberID and tl.leadType='".$leadType."' and tl.status='Y'".$cond." group by mt.country");
	   while ($regionRes=mysql_fetch_array($regionQry)) {
		   if ($count == 0) {
			   ?>
			   <li>
			   <?php
		   }
		   ?>
		   <span class="bg-strip-color1">
		    <?php
		    $countryRes=getResult("country_tbl"," where countryName='".$regionRes['country']."'","countryFlag");
		    if ($countryRes['countryFlag'] != "") {
			    $filenm=SITE_DIR_PATH."/uploaded_files/flags/".$countryRes['countryFlag'];
			    if(file_exists($filenm)) {
				    $filenm1=SITE_URL_PATH."/uploaded_files/flags/".$countryRes['countryFlag'];
				    ?>
				    <img src="<?=$filenm1;?>" alt="" width="20" height="13" />
				    <?php
			    }
		    }
		    ?>
		    <a class="link" href="<?=$link;?>?region=<?=$regionRes[0];?><?=$qry_str;?>"><?=$regionRes[0];?> (<?=$regionRes[1];?>)</a>
		   </span>
		   <?php
	   }
	   $count++;
	   if ($count == 3) {
		   $count=0;
		   ?>
		   </li>
		   <?php
	   }
	   if ($count < 3 && $count != 0) {
		   while ($count < 3) {
			   ?>
			   </span>
			   <?php
			   $count++;
		   }
		   ?>
		   </li>
		   <?php
	   }
	   ?>
	   <div style="clear:both;"></div>
	  </ul>
	 </div>
	 
	   <div style="clear:both;"></div>
	 <p class="bg-boxbc"><img src="<?=SITE_URL_PATH;?>/images/box-br.jpg" alt="" class="fr" /><img src="<?=SITE_URL_PATH;?>/images/box-bl.jpg" alt="" /></p>
	</div>
	<?php
}


function sponsorStatus($id){
	$q = "SELECT memberID FROM sponsor_tbl WHERE memberID = '$id'";
	$r = mysql_query( $q );
	if(mysql_num_rows($r) < 1){
		$stat = "No";
	} 
	else{
	$stat = "Yes";
	}
 return $stat;
}
?>
<?php
function PHeader($ptitle="", $kwords="", $desc="", $pageName="") {

	global $baseurl;
	if ($ptitle=="") {
		$ptitle="Welcome to ".WEBSITE_NAME;
	}
	?>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Natural Therapy Pages</title>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<link href="<?=SITE_URL_PATH;?>/css/style.css" media="screen" rel="stylesheet" type="text/css">
<script src="<?=SITE_URL_PATH;?>/js/common.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/validation.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/lang.js" type="text/javascript"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/Scripts/bookmark.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/showHint.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/images/ae.js" charset="iso-8859-1"></script>
	 <link href="<?=SITE_URL_PATH;?>/css/suggeststyle.css" rel="stylesheet" type="text/css">
  
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestjquery.js"></SCRIPT>
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestscript.js"></SCRIPT>
<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/jquery-1.8.0.min.js"></script>

<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/jquery.js"></script>
<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/ls-v-5.js"></script>

</head>
<body>
<!-- #BeginLibraryItem "/Library/top.lbi" -->
<section class="main">
<section class="top-bar">
<section class="container">
<ul class="left-menu">
 <? if(!empty($_SESSION['sessionID'])) { 
	   validateSession();

		$memID=getMember();

	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	
	?><li class="mr15"><a href="<?=SITE_URL_PATH;?>/my_account.htm">Welcome <?=$memberRes[memberName];?></a></li><?}else{?><li class="mr15"><a href="#"> Welcome New User! </a></li> <?}?>
<? if(!empty($_SESSION['sessionID'])) { ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/my_account.htm" >My Account</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/account_logout.htm">Sign Out</a> </li> <? } else{ ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm">Sign In</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm#toregister" >Freelist your Company</a></li><? } ?>
</ul>
<ul class="right-menu">
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm">Contact Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>/about-us.htm">About Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>">Home</a></li></ul>
</section>
</section>

<section class="container">
<aside class="logo"><a href="<?=SITE_URL_PATH;?>"><img src="<?=SITE_URL_PATH;?>/images/logo.jpg" alt="Natural Therapy"></a> </aside>
</section>


<section class="menu-bg">
<section class="container">
<div class="menu">
<nav id="navigation">
<ul>
<li class="im"><a href="<?=SITE_URL_PATH;?>/">Home</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm">Companies</a></li>
<li><a href="<?=SITE_URL_PATH;?>/products-directory.htm">Products</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#services">Services</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#institutes">Schools</a></li>

</ul>
</nav>
</div>
</section>
</section>

</section>
<?php
}
?>
<?php
function memberHeader($ptitle="", $kwords="", $desc="", $pageName="") {

	global $baseurl;
	if ($ptitle=="") {
		$ptitle="Welcome to ".WEBSITE_NAME;
	}
	?>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Account - Natural Therapy India</title>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<link href="<?=SITE_URL_PATH;?>/css/style.css" media="screen" rel="stylesheet" type="text/css">
<script src="<?=SITE_URL_PATH;?>/js/common.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/validation.js" type="text/javascript"></script>
	<script src="<?=SITE_URL_PATH;?>/js/lang.js" type="text/javascript"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/Scripts/bookmark.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/showHint.js"></script>
	<script type="text/javascript" src="<?=SITE_URL_PATH;?>/images/ae.js" charset="iso-8859-1"></script>
	 <link href="<?=SITE_URL_PATH;?>/css/suggeststyle.css" rel="stylesheet" type="text/css">
  
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestjquery.js"></SCRIPT>
 <SCRIPT LANGUAGE="JavaScript" src="<?=SITE_URL_PATH;?>/js/suggestscript.js"></SCRIPT>
<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/jquery-1.8.0.min.js"></script>

<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/jquery.js"></script>
<script type="text/javascript" src="<?=SITE_URL_PATH;?>/js/ls-v-5.js"></script>

</head>
<body>
<!-- #BeginLibraryItem "/Library/top.lbi" -->
<section class="main">
<section class="top-bar">
<section class="container">
<ul class="left-menu">
 <? if(!empty($_SESSION['sessionID'])) { 
	   validateSession();

		$memID=getMember();

	$memberRes=getResult("member_tbl"," where memberID='$memID'");
	
	?><li class="mr15"><a href="<?=SITE_URL_PATH;?>/my_account.htm">Welcome <?=$memberRes[memberName];?></a></li><?}else{?><li class="mr15"><a href="#"> Welcome New User! </a></li> <?}?>
<? if(!empty($_SESSION['sessionID'])) { ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/my_account.htm" >My Account</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/account_logout.htm">Sign Out</a> </li> <? } else{ ?><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm">Sign In</a></li><li class="mr15"> <a href="<?=SITE_URL_PATH;?>/login.htm#toregister" >Freelist your Company</a></li><? } ?>
</ul>
<ul class="right-menu">
<li><a href="<?=SITE_URL_PATH;?>/contact-us.htm">Contact Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>/about-us.htm">About Us</a></li>
<li><a href="<?=SITE_URL_PATH;?>">Home</a></li></ul>
</section>
</section>

<section class="container">
<aside class="logo"><a href="<?=SITE_URL_PATH;?>"><img src="<?=SITE_URL_PATH;?>/images/logo.jpg" alt="Natural Therapy"></a> </aside>
</section>

<!--
<section class="menu-bg">
<section class="container">
<div class="menu">
<nav id="navigation">
<ul>
<li class="im"><a href="<?=SITE_URL_PATH;?>/">Home</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm">Companies</a></li>
<li><a href="<?=SITE_URL_PATH;?>/products-directory.htm">Products</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#services">Services</a></li>
<li><a href="<?=SITE_URL_PATH;?>/companies-directory.htm#institutes">Schools</a></li>
</ul>
</nav>
</div>
</section>
</section>
<section class="green-bar">
<section class="container h15">
  <div class="greenimg"><br>
  </div>
</section>
</section>
-->
<section class="container mt15 ov"><div class="my-folder-menu"><div class="my-natural"><a href="<?=SITE_URL_PATH;?>/my_account.htm"><span class="bl">My NTI </span>Dashboard</a></div><nav id="menu-wrap"><div id="menu-trigger">Menu</div>    
	<ul id="my-menu">
		<li>
			<a href="<?=SITE_URL_PATH;?>/company-profile.htm">Company Profile</a>
			<ul>
				<li><a href="<?=SITE_URL_PATH;?>/edit-comp-profile.htm">Edit Company Profile</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/edit-contact.htm">Edit Contact Details</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/promote-weburl.htm">Promote Website URL</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/location-prefer.htm">Location Prefrences</a></li>
			</ul>
		</li>
		<li>
			<a href="<?=SITE_URL_PATH;?>/my-enquiry.htm">My Enquiries</a>
			<ul>
				<li><a href="<?=SITE_URL_PATH;?>/my-enquiry.htm">Inbox</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/outbox.htm">Outbox</a></li>
				<li><a href="<?=SITE_URL_PATH;?>/deleted.htm">Deleted</a></li>
			</ul>
			
			</li>
		<li>
			<a href="<?=SITE_URL_PATH;?>/my-products.htm">Products</a>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-product.htm">Add New Products</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-products.htm">My Products</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-groups.htm">Manage Product Groups</a></li>
			</ul>		
		</li>
		<li><a href="<?=SITE_URL_PATH;?>/my-services.htm">Services</a>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-service.htm">Add new Services</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-services.htm">Manage Services</a></li></li>
			</ul>		
		</li>
		<li>
			<a href="<?=SITE_URL_PATH;?>/my-courses.htm">Courses</a>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/add-course.htm">Add New Course</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/my-courses.htm">Manage Course</a></li>
			</ul>		
		</li>
		<li>
			<a href="<?=SITE_URL_PATH;?>/premium-membership.htm" target="_blank">Advertise</a>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/premium-membership.htm" target="_blank">Paid Membership</a></li>
			<!--	<li><a href="<?=SITE_URL_PATH;?>/banner-advertise.htm">Banner Advertisement</a></li>-->
			</ul>		
		</li>
		<li>
			<a href=""><img src="<?=SITE_URL_PATH;?>/images/setting.jpg" height="20" width="20"></a>
			<ul>
			<li><a href="<?=SITE_URL_PATH;?>/change-password.htm">Change Password</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/remove-account.htm">Remove My Account</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/feedback.htm">Feedback</a></li>
			<li><a href="<?=SITE_URL_PATH;?>/account_logout.htm">Logout</a></li>
			</ul>		
		</li>
	</ul>
</nav>
<?php
}
?>