function postcardForm1() { //var text = escape(document.getElementById("sendContext1").innerHTML); var yourName=document.getElementById("yourName").value; var yourEmail=document.getElementById("email").value; var recipientsName = document.getElementById("recipientName").value; var recipientsEmail=document.getElementById("recipientEmail").value; var subjectStr=yourName + " " + document.getElementById("subject1").innerHTML; $.post("/readStories/sendEmail.do", { from: yourEmail, yourname: yourName, to: recipientsEmail, recipientsname: recipientsName, subject: subjectStr, imgVersion: "grey" }, function(data) { //alert(data); //if (data == "success") { pageTracker._trackPageview("/postcard_grey_submitted" ); document.getElementById('light').className = 'white_content'; document.getElementById('preview1').style.display = 'none'; document.getElementById('thankYou').style.display = 'block'; /*} else { alert(data); return false; }*/ }); } function postcardForm22() { //var text = escape(document.getElementById("sendContext2").innerHTML); var yourName = document.getElementById("yourName2").value; var yourEmail = document.getElementById("email2").value; var recipientsName = document.getElementById("recipientName2").value; var recipientsEmail = document.getElementById("recipientEmail2").value; var subjectStr=yourName + " " + document.getElementById("subject1").innerHTML; $.post("/readStories/sendEmail.do", { from: yourEmail, yourname: yourName, to: recipientsEmail, recipientsname: recipientsName, subject: subjectStr, imgVersion: "orange" }, function(data) { //alert(data); //if (data == "success") { pageTracker._trackPageview("/postcard_orange_submitted" ); document.getElementById('light').className = 'white_content'; document.getElementById('preview2').style.display = 'none'; document.getElementById('thankYou').style.display = 'block'; /*} else { alert(data); return false; }*/ }); } function postcardForm3() { //var text = escape(document.getElementById("sendContext1").innerHTML); var yourName=document.getElementById("yourName").value; var yourEmail=document.getElementById("email").value; var recipientsName = document.getElementById("recipientName").value; var recipientsEmail=document.getElementById("recipientEmail").value; var subjectStr="A tidbit of information I think you should know..."; $.post("/readStories/sendEmail.do", { from: yourEmail, yourname: yourName, to: recipientsEmail, recipientsname: recipientsName, subject: subjectStr, imgVersion: "blue" }, function(data) { //alert(data); //if (data == "success") { pageTracker._trackPageview("/postcard_grey_submitted" ); document.getElementById('light').className = 'white_content'; document.getElementById('preview1').style.display = 'none'; document.getElementById('thankYou').style.display = 'block'; /*} else { alert(data); return false; }*/ }); } function previewCheck1() { //alert(document.getElementById('yourName').value); if (!V2validateData("required", document.getElementById('yourName'))) { document.getElementById('yourName').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('yourName').style.backgroundColor = ""; } if (!V2validateData("email", document.getElementById('email'))) { document.getElementById('email').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('email').style.backgroundColor = ""; } if (!V2validateData("required", document.getElementById('recipientName'))) { document.getElementById('recipientName').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('recipientName').style.backgroundColor = ""; } if (!V2validateData("email", document.getElementById('recipientEmail'))) { document.getElementById('recipientEmail').style.backgroundColor = "#80C8FE"; return false } else { document.getElementById('recipientEmail').style.backgroundColor = ""; } var postcardForm = document.forms["postcardForm"]; document.getElementById('sender').innerHTML=postcardForm.yourName.value; document.getElementById('sender2').innerHTML=postcardForm.yourName.value; document.getElementById('recipient').innerHTML=postcardForm.recipientName.value; document.getElementById('recipient2').innerHTML=postcardForm.recipientName.value; document.getElementById('light').className='previewBox'; document.getElementById('infoBox').style.display='none'; document.getElementById('preview1').style.display='block'; document.getElementById('spanSender1').innerHTML=postcardForm.yourName.value; } function previewCheck2() { if (!V2validateData("required", document.getElementById('yourName2'))) { document.getElementById('yourName2').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('yourName2').style.backgroundColor = ""; } if (!V2validateData("email", document.getElementById('email2'))) { document.getElementById('email2').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('email2').style.backgroundColor = ""; } if (!V2validateData("required", document.getElementById('recipientName2'))) { document.getElementById('recipientName2').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('recipientName2').style.backgroundColor = ""; } if (!V2validateData("email", document.getElementById('recipientEmail2'))) { document.getElementById('recipientEmail2').style.backgroundColor = "#80C8FE"; return false; } else { document.getElementById('recipientEmail2').style.backgroundColor = ""; } var postcardForm2 = document.forms["postcardForm2"]; document.getElementById('sender3').innerHTML=postcardForm2.yourName.value; document.getElementById('sender4').innerHTML=postcardForm2.yourName.value; document.getElementById('recipient3').innerHTML=postcardForm2.recipientName.value; document.getElementById('recipient4').innerHTML=postcardForm2.recipientName.value; document.getElementById('light').className='previewBox'; document.getElementById('infoBox2').style.display='none'; document.getElementById('preview2').style.display='block'; document.getElementById('spanSender2').innerHTML = postcardForm2.yourName.value; }