//Top/*
/*function addbookmark(){
var bookmarkurl=document.location.href;var bookmarktitle=document.title;
if (window.sidebar)
{
//MOZILLA FIREFOX
window.sidebar.addPanel(bookmarktitle, bookmarkurl,""); //mozilla
}
else if( window.external )
{ // IE Favorite
window.external.AddFavorite( bookmarkurl, bookmarktitle);
}
else if(window.opera && window.print)
{ // Opera Hotlist
  return true;
}

}*/
//Left and Left Inner

function getaction(gf)
{
	if(gf=="Sub")
		document.form2.cmd_submit_1.value = gf;
	else
		document.form2.cmd_submit_2.value = gf;	
}

function checkvalid()
{
	if (document.form2.subscribe.value=="") 
	{
		alert("Please enter Email");
		document.form2.subscribe.focus();
		return false;
	}
	if(document.form2.subscribe.value.length >= 1 )
	{
		chk1=" !#$%^&*|\~`{}[]:<>?/,";
		for(i=0;i!=document.form2.subscribe.value.length;i++)
		{
			ch1=document.form2.subscribe.value.charAt(i);
			rtn1=chk1.indexOf(ch1);
			if(rtn1!=-1)
			{
				alert("Please Enter Your Valid Email!!");
				document.form2.subscribe.focus();
				return false;
				break;
			}
		}
		chl = document.form2.subscribe.value.indexOf("@");
		chk = document.form2.subscribe.value.lastIndexOf(".");
		if (chl<1 || chl>chk || chk==(document.form2.subscribe.value.length-1) || (chk-chl)==1)
		{
			alert("Please Enter Your Valid Email!!");
			document.form2.subscribe.focus();
			return false;
		}
	return true;

	}
}

function submitForm(name)
{	
	document.forms[name].submit();	
}

function submitSubscriberForm(){
	if(checkvalid()==true){
		document.forms["form2"].submit();	
	}
}

function searchGemeny()
{
	if(document.form1.keyword.value==''){
		alert('Search value can not be blank.');
		document.form1.keyword.focus();
	}else{
		document.forms["form1"].submit();	
	}
}

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}

function Delete_Cookie( name, path, domain ) {
	if ( getCookie( name ) ) document.cookie = name + "=" +
	( ( path ) ? ";path=" + path : "") +
	( ( domain ) ? ";domain=" + domain : "" ) +";expires=Thu, 01-Jan-1970 00:00:01 GMT";
	
}



