// JavaScript Document
function newsLetter(){
	
 

	
	alert(flage);
}

function mynewsLetter()
{
var addvote;
var vote;

var s=document.getElementById("newsletter").value;
var flage=true;
		var pos;
       var pos2;
//==========================================
 if(s == "")
 {
	alert("Please Enter a valid e-mail address");
	flage=false;
	document.getElementById("newsletter").focus();
	return false;
 }
 pos = s.indexOf('@',1);
 if((pos == -1) || (pos == (s.length-1)))
 {
	alert("Please Enter a valid e-mail address");
	flage=false;
	document.getElementById("newsletter").focus();
	return false;
 }
 pos2 = s.indexOf('.',1);
 if((pos2 == -1) || (pos2 == (s.length-1)))
 {
	alert("Please Enter a valid e-mail address");
	flage=false;
    document.getElementById("newsletter").focus();
	return false;
 }
//============================================

for(var i=0;i<document.subscribe.news_type.length;i++){
	if(document.subscribe.news_type[i].status==true)
		vote=document.subscribe.news_type[i].value;
}
if (vote==null){
	flage=false;
	alert("Please Select subscribe type!!");
	//return false;
}//else{
	//alert(flage);
	//alert(document.getElementById("newsletter").value);
	//alert(vote);
	//addvote="newsletter_subscribe.php?e_mail="+document.getElementById("newsletter").value+"&type="+vote;
	//window.open(addvote,'','width=500, height=250');
	//}
	if(document.getElementById("number").value==""){
		alert("Please enter the valid code");
		document.getElementById("number").focus();
		return false;
	}
	
	
	return true;
	
}

function mywin(page,width,height)
{
window.open(page,'','width='+width+',height='+height+' scroll=no'); 
}

/////////////////////////////////////////////
function ismail()
{
 var pos;
 var pos2;
 var s=document.form1.email.value;
 if(s == "")
 {
	alert("Please Enter a valid e-mail address");
	document.form1.email.focus();
	return false;
 }
 pos = s.indexOf('@',1);
 if((pos == -1) || (pos == (s.length-1)))
 {
	alert("Please Enter a valid e-mail address");
	document.form1.email.focus();
	return false;
 }
 pos2 = s.indexOf('.',1);
 if((pos2 == -1) || (pos2 == (s.length-1)))
 {
	alert("Please Enter a valid e-mail address");
	document.form1.email.focus();
	return false;
 }
 return true;
}

function siteRedirect(val)
{
if(val !=0){
	window.open(val,'_blank')
//window.location.href=val;
}
}

function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}


//===============================================
var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false");

//==================================================