if (window!= top)
top.location.href=location.href;


<!-- Fading Images -->
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;
    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
//end

// numerci value only
function keyCheck(eventObj, obj)
{
	var keyCode

	// Check For Browser Type
	if (document.all){ 
		keyCode=eventObj.keyCode
	}
	else{
		keyCode=eventObj.which
	}

	var str=obj.value

	if(keyCode==46){ 
		if (str.indexOf(".")>0){
			return false
		}
	}

	if((keyCode<48 || keyCode >58)   &&   (keyCode != 46)){ // Allow only integers and decimal points
		return false
	}

	return true
}

// Sudmit Rotana Rewards
function submitrewards()
{
	if (frewards.rtype.value == ""){ 
        alert ("Please Select the information for the \"Type\" field." )
        frewards.rtype.focus()        
		 return;}
	else if (frewards.txtCardNumber.value == ""){ 
        alert ("Please enter the information for the \"Number\" field." )
        frewards.txtCardNumber.focus()        
		 return;}
	else if (frewards.rtype.value == "1" && (frewards.txtCardNumber.value.charAt(0) != "2" && frewards.txtCardNumber.value.charAt(0) != "5")){ 
        alert ("Please correct the information for the \"Number\" field." )
        frewards.txtCardNumber.focus()        
		 return;}
	else if (frewards.rtype.value == "2" && frewards.txtCardNumber.value.charAt(0) != "1"){ 
        alert ("Please correct the information for the \"Number\" field." )
        frewards.txtCardNumber.focus()        
		 return;}
	else if (frewards.rtype.value == "3" && frewards.txtCardNumber.value.charAt(0) != "3"){ 
        alert ("Please correct the information for the \"Number\" field." )
        frewards.txtCardNumber.focus()        
		 return;}
	else if (frewards.txtPinNumber.value == ""){ 
        alert ("Please enter the information for the \"Password\" field." )
        frewards.txtPinNumber.focus()        
		 return;}
	else{
			if (frewards.rtype.value == "1"){ 
				document.frewards.action="http://rotanaloyalty.com/rewards/classic.aspx?txtCardNumber="+document.frewards.txtCardNumber.value+"&txtPinNumber="+document.frewards.txtPinNumber.value;
				document.frewards.submit();
				return;
			} else if (frewards.rtype.value == "2"){ 
				document.frewards.action="http://rotanaloyalty.com/rewards/index.asp?rl_memberno="+document.frewards.txtCardNumber.value+"&rl_password="+document.frewards.txtPinNumber.value;
				document.frewards.submit();
				return;
			}
			if (frewards.rtype.value == "3"){ 
				document.frewards.action="http://rotanaloyalty.com/rselect/index.asp?rl_memberno="+document.frewards.txtCardNumber.value+"&rl_password="+document.frewards.txtPinNumber.value;
				document.frewards.submit();
				return;
			}
		return;}
}	


// Open new page reservation
function submitres()
{
	if (fareaproperty2.id_area.value == ""){ 
        alert ("Please enter the information for the \"Area\" field." )
        fareaproperty2.id_area.focus()        
		 return;}
	else if (fareaproperty2.id_property.value == ""){ 
        alert ("Please enter the information for the \"Property\" field." )
        fareaproperty2.id_property.focus()        
		 return;}
	else{
		document.fareaproperty2.action=document.fareaproperty2.id_property.value;
		document.fareaproperty2.submit();
        return;}
}	

// Rewards Apply now
function submitrapplynow() {
	if (frcapplynow.title.value == ""){ 
        alert ("Please enter the information for the \"Title\" field." )
        frcapplynow.title.focus()        
		 return;}
	else if (frcapplynow.fname.value == ""){ 
        alert ("Please enter the information for the \"First name\" field." )
        frcapplynow.fname.focus()        
		 return;}
	else if (frcapplynow.faname.value == ""){ 
        alert ("Please enter the information for the \"Family Name\" field." )
        frcapplynow.faname.focus()        
		 return;}
	else if (frcapplynow.tel.value == ""){ 
        alert ("Please enter the information for the \"Telephone\" field." )
        frcapplynow.tel.focus()        
		 return;}
	else if (frcapplynow.fax.value == ""){ 
        alert ("Please enter the information for the \"Fax\" field." )
        frcapplynow.fax.focus()        
		 return;}
	else if (frcapplynow.email.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        frcapplynow.email.focus()        
		 return;}
	else if( (frcapplynow.email.value.indexOf('@', 0) == -1) || (frcapplynow.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		frcapplynow.email.focus()
		return;}
	else if (frcapplynow.position.value == ""){ 
        alert ("Please enter the information for the \"Position in the Company\" field." )
        frcapplynow.position.focus()        
		 return;}
	else if (frcapplynow.address.value == ""){ 
        alert ("Please enter the information for the \"Full Personal Postal Address\" field." )
        frcapplynow.address.focus()        
		 return;}
	else if (frcapplynow.cname.value == ""){ 
        alert ("Please enter the information for the \"Company Name\" field." )
        frcapplynow.cname.focus()        
		 return;}
	else if (frcapplynow.caddress.value == ""){ 
        alert ("Please enter the information for the \"Full Address\" field." )
        frcapplynow.caddress.focus()        
		 return;}
	else if (frcapplynow.ctel.value == ""){ 
        alert ("Please enter the information for the \"Telephone\" field." )
        frcapplynow.ctel.focus()        
		 return;}
	else if (frcapplynow.cfax.value == ""){ 
        alert ("Please enter the information for the \"Fax\" field." )
        frcapplynow.cfax.focus()        
		 return;}
	else if (frcapplynow.cemail.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        frcapplynow.cemail.focus()        
		 return;}
	else if( (frcapplynow.email.value.indexOf('@', 0) == -1) || (frcapplynow.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		frcapplynow.email.focus()
		return;}
	else if (frcapplynow.cbusiness.value == ""){ 
        alert ("Please enter the information for the \"Nature of Business\" field." )
        frcapplynow.cbusiness.focus()        
		 return;}
	else if (frcapplynow.gm.value == ""){ 
        alert ("Please enter the information for the \"Gen. Manager\'s Name\" field." )
        frcapplynow.gm.focus()        
		 return;}
	else if (frcapplynow.otherhotel.value == ""){ 
        alert ("Please enter the information for the \"Does your Company deal with any other Hotel\" field." )
        frcapplynow.otherhotel.focus()        
		 return;}
	else if (frcapplynow.reason.value == ""){ 
        alert ("Please enter the information for the \"Reason for using the(se) Hotel(s)\" field." )
        frcapplynow.reason.focus()        
		 return;}
	else if (frcapplynow.roomnight.value == ""){ 
        alert ("Please enter the information for the \"How many room nights does your company produce, on an average, per month?\" field." )
        frcapplynow.roomnight.focus()        
		 return;}
	else if (frcapplynow.memberother.value == ""){ 
        alert ("Please enter the information for the \"Member of any other Reward Program, If yes, please specify :\" field." )
        frcapplynow.memberother.focus()        
		 return;}
	else if (frcapplynow.organize.value == ""){ 
        alert ("Please enter the information for the \"Does your Organize Conferences, Seminars?\" field." )
        frcapplynow.organize.focus()        
		 return;}
	else if (frcapplynow.banquet.value == ""){ 
        alert ("Please enter the information for the \"Do you or does someone else in your Company organize Banquet events?\" field." )
        frcapplynow.banquet.focus()        
		 return;}
	else if (frcapplynow.accomm.value == ""){ 
        alert ("Please enter the information for the \"Does Your Company require accommodation in other cities?\" field." )
        frcapplynow.accomm.focus()        
		 return;}
	else if (frcapplynow.familiar.value == ""){ 
        alert ("Please enter the information for the \"Are you familiar with Rotana Hotels in your City?\" field." )
        frcapplynow.familiar.focus()        
		 return;}
	else if (frcapplynow.readaccept.value == ""){ 
        alert ("Please enter the information for the \"I read and accept all the rules and regulations\" field." )
		 return;}
else{
        document.frcapplynow.submit(); // un-comment to submit form
        return;}
}	
	
// Rewards Classic Queries
function submitrcfqueries()
{
	if (rcfqueries.name.value == ""){ 
        alert ("Please enter the information for the \"Name\" field." )
        rcfqueries.name.focus()        
		 return;}
	else if (rcfqueries.email.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        rcfqueries.email.focus()        
		 return;}
	else if( (rcfqueries.email.value.indexOf('@', 0) == -1) || (rcfqueries.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		rcfqueries.email.focus()
		return;}
else{
        document.rcfqueries.submit(); // un-comment to submit form
        return;}
}	


// Search area property
function submitfareaproperty()
{
	if (fareaproperty.id_area.value != "" && fareaproperty.id_property.value != ""){ 
		document.fareaproperty.action="property-"+document.fareaproperty.id_property.value+".htm";
		document.fareaproperty.submit();
	} else if (fareaproperty.id_area.value != ""){ 
		document.fareaproperty.action="searchbyloc-1-"+document.fareaproperty.id_area.value+"-area.htm";
		document.fareaproperty.submit();
	} else {
		document.fareaproperty.action="searchbyloc-1.htm";
		document.fareaproperty.submit();
	}
}	

// Press room register
function submitpressregister()
{
	if (fpressregister.fname.value == ""){ 
        alert ("Please enter the information for the \"First Name\" field." )
        fpressregister.fname.focus()        
		 return;}
	else if (fpressregister.lname.value == ""){ 
        alert ("Please enter the information for the \"Last Name\" field." )
        fpressregister.lname.focus()        
		 return;}
	else if (fpressregister.email.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        fpressregister.email.focus()        
		 return;}
	else if( (fpressregister.email.value.indexOf('@', 0) == -1) || (fpressregister.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		fpressregister.email.focus()
		return;}
	else if (fpressregister.mediaoutlet.value == ""){ 
        alert ("Please enter the information for \"Your media outlet\" field." )
        fpressregister.mediaoutlet.focus()        
		 return;}
	else if (fpressregister.address.value == ""){ 
        alert ("Please enter the information for the \"Address\" field." )
        fpressregister.address.focus()        
		 return;}
	else if (fpressregister.city.value == ""){ 
        alert ("Please enter the information for the \"City\" field." )
        fpressregister.city.focus()        
		 return;}
	else if (fpressregister.phone.value == ""){ 
        alert ("Please enter the information for the \"Phone\" field." )
        fpressregister.phone.focus()        
		 return;}
	else if (fpressregister.reason.value == ""){ 
        alert ("Please enter the information for the \"Reason for your request\" field." )
        fpressregister.reason.focus()        
		 return;}
	else {
        document.fpressregister.submit(); // un-comment to submit form
        return;}
}	

// Meeting and event reservation
function submitmeeteventres()
{
	if (fmeeteventres.fname.value == ""){ 
        alert ("Please enter the information for the \"First Name\" field." )
        fmeeteventres.fname.focus()        
		 return;}
	else if (fmeeteventres.lname.value == ""){ 
        alert ("Please enter the information for the \"Last Name\" field." )
        fmeeteventres.lname.focus()        
		 return;}
	else if (fmeeteventres.company.value == ""){ 
        alert ("Please enter the information for \"Company\" field." )
        fmeeteventres.company.focus()        
		 return;}
	else if (fmeeteventres.address.value == ""){ 
        alert ("Please enter the information for the \"Address\" field." )
        fmeeteventres.address.focus()        
		 return;}
	else if (fmeeteventres.city.value == ""){ 
        alert ("Please enter the information for the \"City\" field." )
        fmeeteventres.city.focus()        
		 return;}
	else if (fmeeteventres.phone.value == ""){ 
        alert ("Please enter the information for the \"Phone\" field." )
        fmeeteventres.phone.focus()        
		 return;}
	else if (fmeeteventres.email.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        fmeeteventres.email.focus()        
		 return;}
	else if( (fmeeteventres.email.value.indexOf('@', 0) == -1) || (fmeeteventres.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		fmeeteventres.email.focus()
		return;}
	else if (fmeeteventres.reason.value == ""){ 
        alert ("Please enter the information for the \"Reason for your request\" field." )
        fmeeteventres.reason.focus()        
		 return;}
	else {
        document.fmeeteventres.submit(); // un-comment to submit form
        return;}
}	

// Log in Image Library
function submitloginimaglib()
{
	if (fimaglibrary.uimglibrary.value == ""){ 
        alert ("Please enter the information for the \"Username\" field." )
        fimaglibrary.uimglibrary.focus()        
		 return;}
	else if (fimaglibrary.pimglibrary.value == ""){ 
        alert ("Please enter the information for the \"Password\" field." )
        fimaglibrary.pimglibrary.focus()        
		 return;}
else{
        document.fimaglibrary.submit(); // un-comment to submit form
        return;}
}	
// image Library register
function submitregisterimaglib()
{
	if (fimgregister.name.value == ""){ 
        alert ("Please enter the information for the \"Name\" field." )
        fimgregister.name.focus()        
		 return;}
	else if (fimgregister.email.value == ""){ 
        alert ("Please enter the information for the \"Email\" field." )
        fimgregister.email.focus()        
		 return;}
	else if( (fimgregister.email.value.indexOf('@', 0) == -1) || (fimgregister.email.value.indexOf('.') == -1)){
        alert ("Please enter the information for the \"Email\" field." )
		fimgregister.email.focus()
		return;}
	else if( (fimgregister.email.value.indexOf('hotmail', 0) != -1) || (fimgregister.email.value.indexOf('yahoo', 0) != -1) || (fimgregister.email.value.indexOf('gmail', 0) != -1) || (fimgregister.email.value.indexOf('aol', 0) != -1) || (fimgregister.email.value.indexOf('free', 0) != -1) || (fimgregister.email.value.indexOf('msn', 0) != -1) || (fimgregister.email.value.indexOf('xxx', 0) != -1) ){
        alert ("Thank you for registering on our Image library and for your interest in Rotana Hotels.\nPlease note that the library is only available for the media and the travel trade for publishing purposes. To view our properties visual tours, which include the virtual and flat images, please log onto rotana.com and you will be able to view all of them." )
		fimgregister.email.focus()
		return;}
	else if (fimgregister.company.value == ""){ 
        alert ("Please enter the information for the \"Company\" field." )
        fimgregister.company.focus()        
		 return;}
	else if (fimgregister.address.value == ""){ 
        alert ("Please enter the information for the \"Address\" field." )
        fimgregister.address.focus()        
		 return;}
	else if (fimgregister.id_imglibbusiness.value == ""){ 
        alert ("Please enter the information for the \"Type of Business\" field." )
        fimgregister.id_imglibbusiness.focus()        
		 return;}
	else if (fimgregister.purpose.value == ""){ 
        alert ("Please enter the information the \"Purpose\" field." )
        fimgregister.purpose.focus()        
		 return;}
	else if (fimgregister.id_area.value == "n" && fimgregister.id_property.value == "n" && fimgregister.id_imglibfolder.value == "n"){ 
		alert ("Please enter the information for the \"Requested access to\" field." )
		 return;}
	else if (fimgregister.id_area.value != "n" && fimgregister.id_property.value == "n"){ 
		alert ("Please enter the information for the \"Property\" field." )
        fimgregister.purpose.focus()        
		 return;}
	else {
        document.fimgregister.submit(); // un-comment to submit form
        return;}
}	

