<!-- Slide show photo Sub -->
function priveiw_img(img_src,caption){
			window.setTimeout("loading_('"+img_src+"','"+caption+"');",300); // 
		var msg =	document.getElementById('img_loading_inside').style.height = "auto";
		var msg = 	document.getElementById('img_loading_inside').innerHTML="<img src='http://www.nationmultimedia.com/images/loading.gif'   border='0' /> Photo Loading..";
} 
function loading_(img_src,caption){
			var msg =	document.getElementById('img_slide_inside').innerHTML="<img src='"+img_src+"' border='0' />";
			var msg =	document.getElementById('caption_slide_inside').innerHTML=""+caption;
			var msg =	document.getElementById('img_loading_inside').innerHTML="";
			var msg =	document.getElementById('img_loading_inside').style.height = "0px";
	
}
<!-- End Slide show photo Sub -->

//  bookmarksite
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

<!-- OPTION NEWS WINDOWS -->
function newwin(w,wd,h,s) { 
  winny=window.open(w,'theWindow','toolbar=0,status=0,scrollbars='+s+',resizable=0,width='+wd+',height='+h+'');        
  winny.focus() 
}
<!-- OPTION NEWS WINDOWS -->



/* Adjust Text Detail */
var textSize = 13;
var lineHeight = textSize + 5;

function up(id) {
        if (textSize <= 15) 
            textSize += 2;
    lineHeight = textSize + 5;
    document.getElementById(id).style.fontSize = textSize + 'px';
    document.getElementById(id).style.lineHeight = lineHeight + 'px';
	return false;
}		

function down(id) {
    if (textSize >= 15) 
         textSize -= 2;
    lineHeight = textSize + 5;
    document.getElementById(id).style.fontSize = textSize + 'px';
    document.getElementById(id).style.lineHeight = lineHeight + 'px';
	return false;
}
/*------ End Adjust Text Detail -----*/


/* CHECK VALIDATE FORM */
function checkLogin(form1){
         // Email
		if(!validateEmail(form1.email.value)){ 
			form1.email.focus();
			return false; 
		}
		// Password
		if(	form1.password.value==''){  
			alert(" Password is required ");
			form1.password.focus();
			return false;
		}
		if(	form1.password.value.length <= 4){
			alert(" Your password must has at least 5 characters ");
			form1.password.focus(); return false;
		}
	return true;
}

function checkComment(form1){

		if(	form1.sender.value==''){  
			alert("A valid From is required.");
			form1.sender.focus();
			return false;
		}	
		if(	form1.message.value==''){  
			alert("A valid comment  is required.");
			form1.message.focus();
			return false;
		}

		if(	form1.passcode.value==''){  
			alert("A valid Code is required.");
			form1.passcode.focus();
			return false;
		}
	return true;
}

function echeck(str) {

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		if (str.indexOf(at)==-1){
		   alert("Please enter a valid email");
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Please enter a valid email");
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Please enter a valid email");
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Please enter a valid email");
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Please enter a valid email");
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Please enter a valid email");
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Please enter a valid email");
		    return false;
		 }

 		 return true;					
	}

function validateEmail(email,second){
	var emailID=email;
	if (echeck(emailID)==false){
		return false;
	}else{
	    return true;
	}
 }
