	var flashvars = {link : "motive-abonare-sala"};
	var params = {wmode:"opaque"};
	var attributes = {};

    Cufon.replace('.subtitle', { fontFamily: 'unicity' });
    Cufon.replace('.footer', { fontFamily: 'unicity' });
    
	

    $j(document).ready(function() {
        if (document.getElementById('slider-pix') != null) {
            //SAMPLE 4 (walk to item)
            var nS4 = new noobSlide({
                box: $('slider-pix'),
                items: $$('#slider-pix div'),
                size: 940,
                autoPlay: true
            });
        }
		
		if (document.getElementById('flash_content') != null) {
			swfobject.embedSWF("Resources/swf/flapi_final_01.swf", "flash_content", "100%", "100%", "9.0.0", "Resources/swf/expressInstall.swf");
		}
		
		if (document.getElementById('motive') != null) {
		swfobject.embedSWF("resources/swf/banner_mic_5motive.swf", "motive", "280", "105", "9.0.0", "resources/js/libs/swfobject/expressInstall.swf",  flashvars, params, attributes);
		}    
		
		$j('ul.sf-menu').superfish();

		$j('#ofertespeciale').fancybox({ 'overlayOpacity': 0.7, 'padding': 0, 'frameWidth':600, 'frameHeight':350 });
		$j('#corporate').fancybox({ 'overlayOpacity': 0.7, 'padding': 0, 'frameWidth':600, 'frameHeight':350 });
		$j('#harta').fancybox({ 'overlayOpacity': 0.7, 'padding': 0,'frameWidth':699,'frameHeight':449, 'zoomSpeedIn':300 });
		$j('#programaerobic').fancybox({ 'overlayOpacity': 0.7, 'padding': 0, 'frameWidth':750, 'frameHeight':660 });
		$j('#programaerobic2').fancybox({ 'overlayOpacity': 0.7, 'padding': 0, 'frameWidth':750, 'frameHeight':660 });
		$j('#pageload').fancybox({ 'overlayOpacity': 0.7, 'padding': 0 }).trigger('click');
    });
	
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("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmSample.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
