var pop = '';
function openwin4(nm,width,height) {
	var name=nm;
  if (pop && !pop.closed) {
  	pop.close();
	}
  pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=10,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
  if (!pop.opener) popUpWin.opener = self;
}

function chkf2() {
	for (var i = 0; i < document.f2.elements.length; i++) {
		ename = document.f2.elements[i].name ;
		if (ename == 'l_relig[]') {
			var n = 0;
			for ( opt = 0; opt < document.f2.elements[i].options.length; opt++) {
				if (document.f2.elements[i].options[opt].selected==true)
				n++;
			}
			if ( n < 1 ) {
				alert("Select Atleast One Religion");
				document.f2.elements[i].focus();
				return false;
				break;
			}
		}
	}

	if (document.f2.l_cont.options[document.f2.l_cont.selectedIndex].value == "x") {
  	alert("Please Select the country");
    document.f2.l_cont.focus();
    return false;
	}
}

function chk3() {
	if (document.form3.username.value.length == 0) {
  	alert("E-mail address can't be left blank");
    document.form3.username.focus();
    return false;
	}
  if (document.form3.username.value.indexOf('@') == -1) {
  	alert("Error in e-mail address");
    document.form3.username.focus();
    return false;
	}
  if (document.form3.username.value.indexOf('.') == -1) {
  	alert("Error in e-mail address");
    document.form3.username.focus();
    return false;
	}
  if (document.form3.username.value.indexOf('@') != document.form3.username.value.lastIndexOf('@')) {
  	alert("Please Specify One E-mail address only");
    document.form3.username.focus();
    return false;
	}
  if (document.form3.pass_word.value.length <= 0) {
  	alert("Do not leave the PASSWORD field blank");
    document.form3.pass_word.focus();
    return false;
	}
}

function openwin1() {
	var newwin='';
  if (newwin && !newwin.closed) {
  	newwin.close();
	}
  newwin = window.open('about:blank','vinduenavn','height=500,width=777,top=0,left=5,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
  if (!newwin.opener) popUpWin.opener = self;
  document.form4.fgs.value="pop";
  document.form4.submit();
}

function openwin2() {
	var newwin='';
  if (newwin && !newwin.closed) {
  	newwin.close();
	}
  newwin = window.open('about:blank','vinduenavn1','height=350,width=500,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
  if (!newwin.opener) popUpWin.opener = self;
  document.f4.submit();
}

function openwin5(nm,width,height) {
	var name=nm;
  if (pop && !pop.closed) {
  	pop.close();
	}
  pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=340,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
  if (!pop.opener) popUpWin.opener = self;
}

var pop = '';
function livewin(nm,width,height) {
	var name=nm;
  if (pop && !pop.closed) {
  	pop.close();
	}
  pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=10,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
  if (!pop.opener) popUpWin.opener = self;
}

function openwin(nm) {
   	 var name=nm;
   	 if (pop && !pop.closed) {
   		 pop.close();
	 }
	 pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=5,top=5,width=784,height=500,directories=no,menubar=no,SCROLLBARS=yes')");
	 if (!pop.opener) popUpWin.opener = self;
}

function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "easeInSine",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 3000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		//startText: "Go",             // Start text
		       // stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });