// JavaScript Document
//unused?
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
var obj = null; with (document){ if (getElementById)
obj = getElementById(objId); }
if (obj){
//alert(theProp+' '+theValue);
if (theProp == 'value' || theProp == 'src' || theProp == 'action') {
if (theValue == true || theValue == false || theValue == false) {
eval("obj."+theProp+"="+theValue);
} else eval("obj."+theProp+"='"+theValue+"'");
} else {
if (theValue == true || theValue == false) {
eval("obj.style."+theProp+"="+theValue);
} else eval("obj.style."+theProp+"='"+theValue+"'");
}
}
}
//unused?
function clearText(field){
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
}
jQuery(function() {
jQuery(".submit").click(
function() {
var email = jQuery("#email").val();
var dataString = 'email='+ encodeURIComponent(email);
var at = '@';
if (email=='' || email.match(at)!='@' || email=='Subscribe to Stay Informed') {
alert('Please enter a VALID email address!');
}
else {
jQuery('#spinwait').show();
jQuery.ajax({
type: "POST",
url: "http://www.iraniumthemovie.com/homepage/subscribe-email.php",
data: dataString,
success:function() {
jQuery('#spinwait').hide();
alert('Thank you. You are now subscribed to receive updates and special offers.');
},
error:function() {
jQuery('#spinwait').hide();
alert('An error occured. Please try again later.');
},
});
}
return false;
}
);
}); 
