// JavaScript Document
function bindlevel(view,pid)
{	
	window.location.href = 'pages/index.php?view=' + view + '&pid=' + pid;
}
function bindLevel2ListHeader(view,pid,l1id,stype)
{
	window.location.href = 'shopping/index.php?view=' + view + '&pid=' + pid + '&l1id=' + l1id + '&stype=' + stype;
}
function bindlevels(view,pid)
{	
	window.location.href = 'shopping/index.php?view=' + view + '&pid=' + pid + '&stype=1';
}
function forgetpasswordlink()
{	
	window.location.href = 'shopping/index.php?view=forgetpassword';
}

function navigationSD(curpageno,sdnav)
{
	window.location.href = 'home.php?view=list&cpn=' + curpageno + '&sdnav=' + sdnav;
}

function navigationSDH(curpageno,sdnav,stype)
{
	window.location.href = 'index.php?view=list&cpn=' + curpageno + '&sdnav=' + sdnav + '&stype=' + stype;
}


function bindwater()
{	   
   deleteCookieJob('tabralf');
   window.location.href = 'pages/index.php?view=joblist';
}

function deleteCookieJob(name, path, domain) {
    if (getCookieJob(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }	
}

function getCookieJob(name)
{
	if (document.cookie.length>0)
  	{
  		c_start=document.cookie.indexOf(name + "=");
  		if (c_start!=-1)
    	{
		    c_start=c_start + name.length+1;
		    c_end=document.cookie.indexOf(";",c_start);
		    if (c_end==-1) c_end=document.cookie.length;
			    return unescape(document.cookie.substring(c_start,c_end));
	    }
  	}
	return "";
}




function bindsearch()
{
	
 with (window.document.frmSearch)
	{
	   
		if (txtsearch.value=="")
		{
			return;
		}
		else
		{
			
			     	targetUrl = 'shopping/index.php?view=search';
					targetUrl += '&search=' + txtsearch.value;
					targetUrl += '&stype=1';					
					window.location.href = targetUrl;
			   
			/*  if(drpSearch.value==1)
				{					
					targetUrl = 'shopping/index.php?view=search';
					targetUrl += '&search=' + txtsearch.value;
					targetUrl += '&stype=1';					
					window.location.href = targetUrl;
				}
				else if(drpSearch.value==2)
				{
					targetUrl = 'shopping/index.php?view=search';
					targetUrl += '&search=' + txtsearch.value;
					targetUrl += '&stype=2';
					location.href = targetUrl;
				}
				else if(drpSearch.value==3)
				{
			 	  targetUrl = 'pages/index.php?view=sjoblist';	
			 	  targetUrl += '&search=' + txtsearch.value + '&sjobid=1';				  
			 	  location.href = targetUrl;				  
			    }
				else if(drpSearch.value==4)
				{
					targetUrl = 'shopping/index.php?view=sbuyinglead';
					targetUrl += '&search=' + txtsearch.value;
					targetUrl += '&stype=4';
					location.href = targetUrl;
				} */
		 }	
	}

}


