function GetMonthName(nMonth)
{
	var Months = new Array("January","February","March","April","May","June",
	                       "July","August","September","October","November","December");
	return Months[nMonth] 	  	 
}

function get_month_options(mm)
{
	ret_txt="";
	if(mm>0)
	{
		mm=0;
	}
	else
	{
		var thetime=new Date(); 
		var nmonth=thetime.getMonth(); 
		mm=nmonth;
	}
	for(var m=0;m<12;m++)
	{
		if(parseInt(m)==parseInt(mm))
		{
			sel="selected";
		}
		else
		{
			sel="";
		}
		ret_txt+="<option value='" + GetMonthName(m).toLowerCase() + "' " + sel + ">" + GetMonthName(m) + "</option>";
	}
	return ret_txt;
}


function get_day_options(mm)
{
	ret_txt="";
	if(mm>0)
	{
		mm=0;
	}
	else
	{
		var thetime=new Date(); 
		var nmonth=thetime.getDate(); 
		mm=nmonth;
	}
	for(var m=1;m<32;m++)
	{
		if(parseInt(m)==parseInt(mm))
		{
			sel="selected";
		}
		else
		{
			sel="";
		}
		ret_txt+="<option value='" + m + "' " + sel + ">" + m + "</option>";
	}
	return ret_txt;
}


function get_year_options(mm)
{
	ret_txt="";
	if(mm>0)
	{
		mm=0;
	}
	else
	{
		var thetime=new Date(); 
		var nmonth=thetime.getYear(); 
		mm=nmonth;
	}
	for(var m=mm; m < parseInt(mm+3); m++)
	{
		if(parseInt(m)==parseInt(mm))
		{
			sel="selected";
		}
		else
		{
			sel="";
		}
		ret_txt+="<option value='" + m + "' " + sel + ">" + m + "</option>";
	}
	return ret_txt;
}

//////////////////////



function f1()
{
window.dv.innerHTML=msg;
//alert(msg);
}


function f2()
{
window.dv.innerHTML=" ";
//alert(msg);
}

function f3()
{
window.dv.style.visibility='hidden';
//alert(msg);
}


function assign(fm1,fm2)
{
	
	
	
	fm1.recipient.value="";
	//fm1.recipient0.value=" ";
	fm1.recipient1.value=" ";
	fm1.recipient2.value=" ";
	fm1.recipient3.value=" ";
	fm1.recipient4.value=" ";
	fm1.recipient5.value=" ";
	fm1.recipient6.value=" ";
	fm1.recipient7.value=" ";	
	fm1.recipient8.value=" ";	
	fm1.recipient9.value=" ";
	fm1.recipient10.value=" ";

	fm1.to.value=" ";
	//fm1.to0.value=" ";
	fm1.to1.value=" ";
	fm1.to2.value=" ";
	fm1.to3.value=" ";
	fm1.to4.value=" ";
	fm1.to5.value=" ";
	fm1.to6.value=" ";
	fm1.to7.value=" ";	
	fm1.to8.value=" ";	
	fm1.to9.value=" ";
	fm1.to10.value=" ";



	var set=0;
	
	for (var i=0;i<fm2.elements.length;i++)
	{
		if (fm2.elements[i].checked==true)
		{
			//alert(fm2.elements[i].value);
			set++;
			if (set==1)
			{
				fm1.recipient.value=fm2.elements[i].value;
				fm1.to.value=fm2.elements[i].name;	
			}
			
			if (set==2)
			{
				fm1.recipient1.value=fm2.elements[i].value;
				fm1.to1.value=fm2.elements[i].name;	
			}			
			
			if (set==3)
			{
				fm1.recipient2.value=fm2.elements[i].value;
				fm1.to2.value=fm2.elements[i].name;	
			}			
			
			if (set==4)
			{
				fm1.recipient3.value=fm2.elements[i].value;
				fm1.to3.value=fm2.elements[i].name;	
			}			
			
			if (set==5)
			{
				fm1.recipient4.value=fm2.elements[i].value;
				fm1.to4.value=fm2.elements[i].name;	
			}			
			
			if (set==6)
			{
				fm1.recipient5.value=fm2.elements[i].value;
				fm1.to5.value=fm2.elements[i].name;	
			}			
			
			if (set==7)
			{
				fm1.recipient6.value=fm2.elements[i].value;
				fm1.to6.value=fm2.elements[i].name;	
			}			
			
			if (set==8)
			{
				fm1.recipient7.value=fm2.elements[i].value;
				fm1.to7.value=fm2.elements[i].name;	
			}			
			
			if (set==8)
			{
				fm1.recipient7.value=fm2.elements[i].value;
				fm1.to7.value=fm2.elements[i].name;	
			}			
			
			if (set==9)
			{
				fm1.recipient8.value=fm2.elements[i].value;
				fm1.to8.value=fm2.elements[i].name;	
			}			
			
			if (set==10)
			{
				fm1.recipient9.value=fm2.elements[i].value;
				fm1.to9.value=fm2.elements[i].name;	
			}			
			
			if (set==11)
			{
				fm1.recipient10.value=fm2.elements[i].value;
				fm1.to10.value=fm2.elements[i].name;	
			}			
			
			
			
		}
		
	}
	//document.theform.recipient.value=document.fm.c1.value;
	//document.theform.to.value()=window.document.fm.c1.name;
}


//----soundcard technology---------
function soundcardform(imagename,soundfile)
{

document.write('<FORM METHOD=POST name="theform" ACTION="http://www.dgreetings.com/cgi-bin/soundcard.cgi" onSubmit="return isValidpremail(document.sound.elements[1].value, document.sound.elements[3].value , document.sound.elements[8].value , document.sound.elements[10].value, document.sound.elements[12].value , document.sound.elements[14].value , document.sound.elements[16].value)">');


document.write('<CENTER>');
document.write('<TABLE CELLPADDING=0 CELLSPACING=6 WIDTH=300 BORDER=0>');

document.write('<TR>');
document.write('<TD colspan=3><input type="hidden" name="file" value="'+imagename+'" MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<BR><TD colspan=3><FONT SIZE=-1 color="blue">Personalise your card. Use "tab" key to go on to the next field.<br>(* Denotes a required field.)</FONT></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Recipient\'s Email</FONT><sup>*</sup></TD>');
document.write('<TD><input type="TEXT" name="recipient0" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Recipient\'s Name</FONT><sup>*</sup></TD>');
document.write('<TD><input type="text" name="to" value="" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Sender\'s Email</FONT><sup>*</sup></TD>');
document.write('<TD><input type="TEXT" name="senderemail" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

 
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Sender\'s Name</FONT><sup>*</sup></TD>');
document.write('<TD><input type="TEXT" name="realname" value="" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');


document.write('<TR>');
document.write('<TD colspan=3><BR></TD>');

document.write('</TR>');


document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Personal Message:<sup>1</sup></FONT></TD>');
document.write('<TD colspan=2><TEXTAREA NAME="message" COLS="37" ROWS="2" WRAP="virtual" value=""></textarea></TD>');
document.write('</TR>');

 // ************ SUBMIT BUTTON FOR SINGLE RECIEPIENT*******************


document.write('<TR>');
document.write('<TD COLSPAN=2><INPUT TYPE="SUBMIT" NAME="action" onClick="vali(document.sound.elements[8].value ,document.sound.elements[10].value ,document.sound.elements[12].value ,document.sound.elements[14].value , document.sound.elements[16].value);"  VALUE="Send Card"></TD>');
//************************ PREVIEW OF CARD BEEING SEND *******************

document.write('<TD><input type="Button" name="pre" value="Preview" onClick="preview(document.sound.elements[2].value, document.sound.elements[4].value, document.sound.elements[5].value, file.value);"></td>'); 

//********************** END OF PREVIEW *******************

document.write('</TR>');

document.write('<TR>');
document.write('<td colspan=3><br><FONT SIZE=-1 color="blue">For the multiple dispatch of this Card, fill in the E-mail addresses below and press any "Send Card" Button.</FONT><br><br>');
document.write('</TR>');



document.write('<TR>');
document.write('<TD COLSPAN=2><FONT SIZE=-1  color="navy">Recipient\'s Email<sup>2</sup></FONT></TD>');
document.write('<TD><FONT SIZE=-1 color="navy">Recipient\'s Name</FONT></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient1" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to1" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient2" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="text" name="to2"  SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient3" SIZE=25 MAXLENGTH=100></FONT></TD>');
document.write('<TD><input type="TEXT" name="to3"  SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient4" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to4" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient5" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to5" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
//*********
document.write('<TR><td colspan=3><input type="hidden" name="number" value=""></td>');
document.write('</TR>');
document.write('<tr><td colspan=3><input type="hidden" name="sound" value="'+soundfile+'"></td></tr>');
//*********** SUBMIT AND RESET BUTTONS OF MULTIPLE DISPATCH *********

document.write('<TR>');
document.write('<TD COLSPAN=3><INPUT TYPE="SUBMIT" NAME="action" VALUE="Send Card" onClick="convey(file.value);vali(document.sound.elements[8].value ,document.sound.elements[10].value ,document.sound.elements[12].value ,document.sound.elements[14].value , document.sound.elements[16].value);" > &nbsp;&nbsp;<INPUT TYPE="RESET" NAME="Reset" VALUE="Clear All"></TD>');

document.write('</TR>');

document.write('<TR>');
document.write('</TR>');

document.write('</TABLE>');
document.write('</center>');

document.write('<TABLE CELLPADDING=0 CELLSPACING=6 WIDTH=400 BORDER=0 >');
document.write('<TR align=left>');
document.write('<TD align=right valign=top><FONT SIZE=1 color="#B01C5F">NOTE:</FONT></TD>');
document.write('<TD valign=top align=left><FONT SIZE=1 color="#0000da">1</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=1 color="#0000da">Incase of multiple dispatch the message goes to every recipient.</FONT></TD>');
document.write('</TR>');



document.write('<TR>');
document.write('<TD> </TD>');
document.write('<TD valign=top><FONT SIZE=1 color="#0000da">2</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=1 color="#0000da">You can enter multiple recipient\'s email in a single email field by separating the e-mail names with ","</FONT></TD>'); 
document.write('</TR>');
document.write('</TABLE>');

document.write('</FORM>');

//*********closing brace of soundcardform **********

}




function isValidpremail(num, send_email)
{
	/////check recipent email ////
	x=window.document.theform.recipient0.value;
	if(!isBlank(x)) 
	{
		if(isValidEmail(x)) 
		{
		
		}
		else 
		{ 
			alert("Please Enter Valid Recipient E-mail");
			window.document.theform.recipient0.focus();
			return false;
		}
	}
	else
	{
			alert("Please Enter The Recipient E-mail");
			window.document.theform.recipient0.focus();
			return false;
	
	}//end if


	x=window.document.theform.to.value;
	if(!isBlank(x)) 
	{
	}
	else
	{
			alert("Please Enter The Recipient's Name");
			window.document.theform.to.focus();
			return false;
	
	}//end if



	x=send_email.value;
	if(!isBlank(x)) 
	{
		if(isValidEmail(x)) 
		{
		
		}
		else 
		{ 
			alert("Please Enter Valid Sender E-mail");
			send_email.focus();
			return false;
		}
	}
	else
	{
			alert("Please Enter The Sender E-mail");
			send_email.focus();
			return false;
	
	}//end if


	x=window.document.theform.realname.value;
	if(!isBlank(x)) 
	{
	}
	else
	{
			alert("Please Enter The Sender's Name");
			window.document.theform.realname.focus();
			return false;
	
	}//end if

	
	
	var flag_mult_emails=0;
	var param_vali="";

	for(var k=0; k < num; k++) 
	{
		var obj1 = eval("document.theform.recipient" + k);
		//alert(obj1);
		if(obj1)
		{
			param_vali = param_vali + ", " + obj1.value + "";

			//alert('exist' + k)
			if(k>0)
			{
				flag_mult_emails=1;
			}

			x=obj1.value;
			emailArr = x.split(',');
			for(var i=0 ;i < emailArr.length; i++) 
			{
				em = emailArr[i];

				if(!isBlank(em)) 
				{
					if(isValidEmail(em)) 
					{
						continue;
					}
					else 
					{ 
						alert("Please Enter Valid E-mail Address");
						obj1.focus();
						return false;
					}
					return false;
				}//end if

			}// end for

		}// end if object exist
		else
		{
			param_vali = param_vali + ", ";
		}

	}//outer loop for all recipients objects

	if(param_vali!="")
	{
		param_vali = param_vali.substring(2);
	}

	//alert(param_vali);

	if(flag_mult_emails==1)
	{

		if(noRepeatEmail(num))
		{ 



//"document.theform.recipient1.value ,document.theform.recipient2.value ,document.theform.recipient3.value ,theform.recipient4.value , document.theform.recipient5.value,document.theform.recipient6.value,document.theform.recipient7.value,document.theform.recipient8.value,document.theform.recipient9.value,document.theform.recipient10.value"

			if(vali(param_vali))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
	else
	{
		return true;
	}
}

//////////////////////////////////////////

function noRepeatEmail(num)
{
//alert('called repeat')
	var flag=0;
	var all_arrays=new Array();

	for (j=0; j <= num ; j++) 
	{
		
		var obj1 = eval("document.theform.recipient" + j);
		if(obj1)
		{
			if(!isBlank(obj1.value))
			{
				emailArr=obj1.value.split(",");
				all_arrays=all_arrays.concat(emailArr);
			}
		}
	}
	
	for (j=0; j < all_arrays.length; j++) 
	{
		var val1 = all_arrays[j];
		for (jj=0; jj < all_arrays.length ; jj++) 
		{
			if(j!=jj)
			{
				var val2 = all_arrays[jj];
				if(val1==val2)
				{
					flag=1;
				}
			}

		} 	 //end for
		
	}

	if (flag==1)
	{
		alert("Please Ensure That You Have Entered All Different Emails.");
		return false;
	}
	else //no Defferent Emails
	{		
		return true;
	}
		



			
}


//************number of pages for holi

function isValidpremail_xxx(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12){
	email=new Array(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12);
		for (j=0; j<12 ; j++) {
                                              emailArr=email[j].split(",")
                                                 for(var k=0 ;k < emailArr.length; ++k) {
					x=emailArr[k];
                         			if(!isBlank(x)) {
								if(isValidEmail(x)) continue;
                                   						else { 
									alert("Enter Valid E-mail");
								
								
									return false;}
								}
					}
				      }
		return true;
}



function isBlank(s){
//prompt("the value of s",s);
  var len = s.length
  var i
 for(i = 0; i<len ; ++i) {
  if (s.charAt(i)!=" ") return false;  
			}
   return true;
}

function isValid(s1) {
var ch = s1.charAt(0);
var chArr = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' , '-');
for(i = 0;i < 26 ; i++ ) {
 if (ch == chArr[i].toUpperCase() || ch == chArr[i]) return true
}
return false
}


function isValidEmail(e){
var spch = new Array('~','`',"'",'"',',','!','#','$','%','^','&','*',"(",")","=","+","|","\\","{","}","[","]",";",":","?","/","<",">")
var len = spch.length
var elen = e.length
var i=e.indexOf("@")
var j=0
var k=0
if(isValid(e) && i>0){
  if( (i >= 1) && (e.indexOf("@",i+1) == -1) && (e.indexOf(".",i+1) > 0)){
       for(j = 0;j < elen;j++){
          for(k = 0;k < len;k++){
                if(e.charAt(j) == spch[k])   return false
                                       }
                                     }
               return true
             }
}
return false
}



function suggestthesite()
{
document.write('<FORM name="theform" METHOD=POST ACTION="http://www.dgreetings.com/cgi-bin/suggestsite.pl">')
document.write('<CENTER>')
document.write('<TABLE CELLPADDING=0 CELLSPACING=6 WIDTH=400 BORDER=0>')
document.write('<TR>')
document.write('<TD colspan=2><FONT SIZE=-1>* Denotes a required field.</FONT></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD><FONT SIZE=-1>Friend\'s Email</FONT><sup>*</sup></TD>')
document.write('<TD><input type="TEXT" name="recipient0" SIZE=30 MAXLENGTH=100></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD><FONT SIZE=-1>Friend\'s Name</FONT><sup>*</sup></TD>')
document.write('<TD><input type="text" name="to" value="" SIZE=30 MAXLENGTH=100></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD><FONT SIZE=-1>Your Email</FONT><sup>*</sup></TD>')
document.write('<TD><input type="TEXT" name="email" SIZE=30 MAXLENGTH=100></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD><FONT SIZE=-1>Your Name</FONT><sup>*</sup></TD>')
document.write('<TD><input type="TEXT" name="realname" value="" SIZE=30 MAXLENGTH=100></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD colspan=2><FONT SIZE=-1>Message:<br>(Send a personal message.)</FONT></TD>')
document.write('<TD></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD colspan=2><TEXTAREA NAME="message" COLS="37" ROWS="2" WRAP="virtual" value=""></TEXTAREA></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD COLSPAN=2><INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Recommend"> &nbsp;&nbsp;<INPUT TYPE="RESET" NAME="Reset" VALUE="Clear All"></TD>')
document.write('</TR>')
document.write('</TABLE>')
document.write('</CENTER>')
document.write('</FORM>')
}


//********** function to check no. of cards ***************

function vali(message0,message1,message2,message3,message4,message5,message6,message7,message8,message9)
{
	num=10;
	for(var k=0; k < num; k++) 
	{
		var obj1 = eval("document.theform.recipient" + k);
		//alert(obj1);
		if(obj1)
		{
			rec_val=obj1.value;
			eval("var message" + k + " =  rec_val");
		}
		else
		{
			eval("var message" + k + " =  ''");
		}
	}
	

	count0=0;	
	count1=0;
	count2=0;
	count3=0;
	count4=0;
	count5=0;
	count6=0;
	count7=0;
	count8=0;
	count9=0;
	//alert(message3);
	var i0=message0.length;
	var i1=message1.length;
	var i2=message2.length;
	var i3=message3.length;
	var i4=message4.length;
	var i5=message5.length;
	var i6=message6.length;
	//alert(i6);
	var i7=message7.length;
	var i8=message8.length;
	var i9=message9.length;
	if(message1!=""){
					for(j=0;j<i1;j++){
									if(message1.charAt(j)==","){
																count1++;		
																//alert("received message");
											
																}
													
									else					{
											
															}
										}
					count1++				
					}
	//prompt("the message",message1)	

//********* content validator for recipient0 *************
    
	if(message0!=""){
					for(j=0;j<i0;j++){
									if(message0.charAt(j)==","){
																count0++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count0++;
					//prompt("the count is1:",count0)
			    	}

//********* content validator for recipient2 *************
    
	if(message2!=""){
					for(j=0;j<i2;j++){
									if(message2.charAt(j)==","){
																count2++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count2++;
					//prompt("the count is:",count2)
			    	}

//********* content validator for recipient3 *************
    
	if(message3!=""){
					for(j=0;j<i3;j++){
									if(message3.charAt(j)==","){
																count3++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count3++;
					//prompt("the count is:",count3)
			    	}
//********* content validator for recipient4 *************

	if(message4!=""){
					for(j=0;j<i4;j++){
									if(message4.charAt(j)==","){
																count4++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count4++;
					//prompt("the count is:",count4)
			    	}

					
//********* content validator for recipient5 *************

	if(message5!=""){
					for(j=0;j<i5;j++){
									if(message5.charAt(j)==","){
																count5++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count5++;
					//prompt("the count is:",count5)
			    	}					
			
	//********* content validator for recipient6 *************

	if(message6!=""){
					for(j=0;j<i6;j++){
									if(message6.charAt(j)==","){
																count6++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count6++;
					//prompt("the count is:",count4)
			    	}		
					
					
	//********* content validator for recipient7 *************

	if(message7!=""){
					for(j=0;j<i7;j++){
									if(message7.charAt(j)==","){
																count7++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count7++;
					//prompt("the count is:",count4)
			    	}
					
		//********* content validator for recipient8 *************

	if(message8!=""){
					for(j=0;j<i8;j++){
									if(message8.charAt(j)==","){
																count8++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count8++;
					//prompt("the count is:",count4)
			    	}			
		//********* content validator for recipient9 *************

	if(message9!=""){
					for(j=0;j<i9;j++){
									if(message9.charAt(j)==","){
																count9++;		
																//alert("received message");
											
																}
													
									else					{
										
															}
									}
					count9++;
					//prompt("the count is:",count4)
			    	}
					
//************ Passing of Total number of cards ****************

		count=count0+count1+count2+count3+count4+count5+count6+count7+count8+count9;
		count=count+1;
		//prompt("the total no of cards",count);
		document.theform.number.value=count;
	        // alert(document.theform.number.value);
		count=0;

return true;

//*************closing brace for the function *************
}

//***email validation incase of single recipient*****
function isValidpremail1(e1,e2){
	email=new Array(e1,e2);
		for (j=0; j<email.length ; j++) {
                                              emailArr=email[j].split(",")
                                                 for(var k=0 ;k < emailArr.length; ++k) {
					x=emailArr[k];
                         			if(!isBlank(x)) {
								if(isValidEmail(x)) continue;
                                   						else { 
									alert("Enter Valid E-mail");
								
								
									return false;}
								}
					}
				      }
		return true;
}
//ads=new Array('<APPLET code=imglink.class codebase="http://www.dgreetings.com" height="60"  width="468" ><PARAM NAME="link" VALUE="http://www.worldphoneone.com"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/worldphoneone1.gif" width="468" height="60" border="1" alt="worldphoneone.com"></APPLET>')
ads=new Array('<a href="http://www.theeid.com/index.html" target="_blank"><img src="http://www.dgreetings.com/newimages/banners/theeidbanner.gif" width="468" height="60" border="1" alt="Send Eid Gifts With free cards"></a>')
function outsider(){
adIX = Math.round(Math.random()*(ads.length-1));
 document.write(ads[adIX]);
}
adsgg=new Array('<a href="http://www.allaboutsikhs.com" target="_blank"><img src="http://www.dgreetings.com/newimages/banners/allaboutsikhs.gif" alt="allaboutsikhs.com"></a>')
function outsidergg(){
adIX = Math.round(Math.random()*(adsgg.length-1));
 document.write(adsgg[adIX]);
}

function outsider1(){

bust = Math.floor(1000000*Math.random());
document.write('<IFRAME WIDTH=468 HEIGHT=60 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000" SRC="http://ads.mediaturf.net/html.ng/site=dgreetings&size=468x60&bust='+bust+'">\n');
document.write('<SCR' + 'IPT LANGUAGE="JavaScript1.1" SRC="http://ads.mediaturf.net/js.ng/Params.richmedia=yes&site=dgreetings&size=468x60&bust='+bust+'">\n');
document.write('</SCR' + 'IPT>\n');
document.write('</IFRAME>');

document.write('<NOSCRIPT><A HREF="http://ads.mediaturf.net/click.ng/Params.richmedia=yes&site=dgreetings&size=468x60"><IMG WIDTH=468 HEIGHT=60 border=0 SRC="http://ads.mediaturf.net/image.ng/Params.richmedia=yes&site=dgreetings&size=468x60"></A></NOSCRIPT>')
}


function header1() {

//*******outer table**********
document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" bgcolor="#90E9FE"> <TR valign="top">')
document.write('<TD width=170 align=center>')
//******inner table*********
document.write('<a href="http://dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/homegif/newlogo.gif"  border="0" alt="Send Greeting Cards" width="154" height="48"></a>&nbsp;&nbsp;</td>')

//document.write('kris')
document.write('<td valign="top" align="center">')
outsider()

//randomb()
//document.write('<img src="http://www.dgreetings.com/newimages/homegif/germanversion.gif"  border="0" alt="German Version">');
//rightcurrentfestivals() 
//document.write('<A HREF="http://www.theeid.com" target="_blank"><img src="http://www.dgreetings.com/images/eidsmall.gif" width="175" height="36" border="1" alt="Eid Mubarak"></A>')
//document.write('<a href="http://de.dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/homegif/germanversion.gif"  border="0" alt="German Version"></a>')
//document.write('<br><a href="http://www.dgreetings.com/lovemeter/lovemeter.htm" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Love Calculator</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/flames/flames.html" target="_blank"><font size="2"  face="Arial" color="navy"><b>Flames</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovehoroscope/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Horoscope</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovequotation/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Quotations</b></font></a></td><td valign="top" align="right"><a href="http://www.dgreetings.com"><img src="http://www.dgreetings.com/newimages/homegif/dgreetingslogo.jpg" width=154 height=48 border=0 alt="Dgreetings.com"></a><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" width="160" height="44" ><PARAM NAME="link" VALUE="http://www.123world.com" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/123world3.gif" width="160" height="44" border="1" alt="Virtual Rakhi"></APPLET><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" height="47"  width="96" ><PARAM NAME="link" VALUE="http://de.dgreetings.com/index.html" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/germanversion.gif" width="96" height="47" border="1" alt="Virtual Rakhi"></APPLET></td>')
document.write('<br><a href="http://www.theydeserveit.com" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Shopping</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovemeter/lovemeter.htm" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Love Calculator</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/flames/flames.html" target="_blank"><font size="2"  face="Arial" color="navy"><b>Flames</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovehoroscope/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Horoscope</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovequotation/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Quotations</b></font></a></td><td valign="top" align="right"><a href="http://shopping.rediff.com/shopping/events/pongal.htm" target="_blank"><img src="http://www.dgreetings.com/newimages/pongalgifts.gif" border=0 alt="Send Pongal Gifts"></a><br><br><a href="http://dgreetings.com/newchat/chat.html"><img src="http://www.dgreetings.com/newimages/newchat.gif"  border="0" alt="Chat @ The Speed Of Thought"></a>&nbsp;<a href="http://www.dgreetings.com/logpaswd/signup.html"><img src="http://www.dgreetings.com/newimages/login.gif"  border="0" alt="login"></a>&nbsp;<a href="http://de.dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/german.gif"  border="0" alt="German Version"></a><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" height="47"  width="96" ><PARAM NAME="link" VALUE="http://es.dgreetings.com/index.html" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/spanishgreetings.gif" width="96" height="47" border="1" alt=""></APPLET></td>')
document.write('</td>')
//********** end of inner table **********
document.write('</tr></table>')
//*******end of outer table ****************
document.write('</TD></TR></TABLE>')

}
function headerggb() {

//*******outer table**********
document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" bgcolor="#90E9FE"> <TR valign="top">')
document.write('<TD width=170 align=center>')
//******inner table*********
document.write('<a href="http://dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/homegif/newlogo.gif"  border="0" alt="Send Greeting Cards" width="154" height="48"></a>&nbsp;&nbsp;</td>')

//document.write('kris')
document.write('<td valign="top" align="center">')
outsidergg()

//randomb()
//document.write('<img src="http://www.dgreetings.com/newimages/homegif/germanversion.gif"  border="0" alt="German Version">');
//rightcurrentfestivals() 
//document.write('<A HREF="http://www.theeid.com" target="_blank"><img src="http://www.dgreetings.com/images/eidsmall.gif" width="175" height="36" border="1" alt="Eid Mubarak"></A>')
//document.write('<a href="http://de.dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/homegif/germanversion.gif"  border="0" alt="German Version"></a>')
//document.write('<br><a href="http://www.dgreetings.com/lovemeter/lovemeter.htm" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Love Calculator</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/flames/flames.html" target="_blank"><font size="2"  face="Arial" color="navy"><b>Flames</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovehoroscope/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Horoscope</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovequotation/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Quotations</b></font></a></td><td valign="top" align="right"><a href="http://www.dgreetings.com"><img src="http://www.dgreetings.com/newimages/homegif/dgreetingslogo.jpg" width=154 height=48 border=0 alt="Dgreetings.com"></a><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" width="160" height="44" ><PARAM NAME="link" VALUE="http://www.123world.com" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/123world3.gif" width="160" height="44" border="1" alt="Virtual Rakhi"></APPLET><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" height="47"  width="96" ><PARAM NAME="link" VALUE="http://de.dgreetings.com/index.html" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/germanversion.gif" width="96" height="47" border="1" alt="Virtual Rakhi"></APPLET></td>')
document.write('<br><a href="http://www.theydeserveit.com" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Shopping</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovemeter/lovemeter.htm" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Love Calculator</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/flames/flames.html" target="_blank"><font size="2"  face="Arial" color="navy"><b>Flames</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovehoroscope/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Horoscope</b></font></a>&nbsp;&nbsp;<a href="http://www.dgreetings.com/lovequotation/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Quotations</b></font></a></td><td valign="top" align="right"><APPLET code=imglink.class codebase="http://www.dgreetings.com" width="150" height="45" ><PARAM NAME="link" VALUE="http://www.theydeserveit.com" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/shoponline.gif" width="150" height="45" border="1" alt="theydeserveit.com"></APPLET><br><br><a href="http://dgreetings.com/newchat/chat.html"><img src="http://www.dgreetings.com/newimages/newchat.gif"  border="0" alt="Chat @ The Speed Of Thought"></a>&nbsp;<a href="http://www.dgreetings.com/logpaswd/signup.html"><img src="http://www.dgreetings.com/newimages/login.gif"  border="0" alt="login"></a>&nbsp;<a href="http://de.dgreetings.com/" target=_blank><img src="http://www.dgreetings.com/newimages/german.gif"  border="0" alt="German Version"></a><br><br><APPLET code=imglink.class codebase="http://www.dgreetings.com" height="47"  width="96" ><PARAM NAME="link" VALUE="http://es.dgreetings.com/index.html" target="_blank"><PARAM NAME="image" VALUE="http://www.dgreetings.com/newimages/homegif/spanishgreetings.gif" width="96" height="47" border="1" alt=""></APPLET></td>')
document.write('</td>')
//********** end of inner table **********
document.write('</tr></table>')
//*******end of outer table ****************
document.write('</TD></TR></TABLE>')

}
function right(){
document.write('<table border="0" cellspacing="1">')
document.write('<tr><td colspan="3" align="left"><font color=blue><b>Surfers<br> Demand</b></font>')
document.write('</td><td></td>')
//document.write('<td align="center"><font color=navy>Christmas</td></tr>')
document.write('<tr><td>')
document.write('<a href="http://www.dgreetings.com/newyear/flash/5.htm" target="_blank"><img src="http://www.dgreetings.com/newimages/homegif/5t.gif"  border="1" alt="Happy New Year"></a><br>')
document.write('</td></tr><tr><td align="left"><font color=navy>New Year</td></tr>')
//document.write('</td>')
//document.write('<td>')
document.write('<tr><td>')
document.write('<a href="http://www.dgreetings.com/newyear/animated/thanks1.htm"><img src="http://www.dgreetings.com/newimages/newyear/animated/thanks1t.gif"  border="1" alt="New Year Thanks Card" width=60 height=60></a><br>')
document.write('</td></tr><tr><td align="left"><font color=navy>New Year Thanks</td></tr>')

//document.write('</td>')
//document.write('<td>')
document.write('<tr><td>')
document.write('<a href="http://www.dgreetings.com/newyear/animated/24.htm"><img src="http://www.dgreetings.com/newimages/homegif/newyear1.gif"  border="1" alt="Happy New Year"></a></td>')
document.write('</td></tr><tr><td align="left"><font color=navy>New Year</td></tr>')


document.write('</TABLE>')
}

//**************personalised card form *************
function personalised(suffix,perfix,rpteid,rptname,sdreid,sdrname,imagename)
{


	if(isValidpremail(10, document.theform.senderemail))
	{

		//*********check for passing of relevant values****************

		/*prompt("Recipient Name:",rptname);
			prompt("Recipient Email:",rpteid);
			prompt("Your Name:",sdrname);
			prompt("Your Email:",sdreid);
			prompt("Image Name:",imagename);
			prompt("Your Message:",msg);*/
		//prompt("image name",imagename);
		/*prompt("month",month11);
		prompt("day",day11);
		prompt("year",year11);
		prompt("dateselected",dateselected11);*/
		document.write('<HTML><HEAD><TITLE>Personalised Greeting Cards:Dgreetings.com</TITLE>');
		document.write('<META NAME="Description" CONTENT="Greeting cards for all occasions ie, anniversary, birthday, christmas, congratulations, diwali, dusshera, engagement, friend, farewell, good luck, get well soon, love you, miss you, new year, sorry, thank you, wedding"><META NAME="Keywords" CONTENT="card, anniversary, anniversary greeting cards, anniversarygreetingcards, greeting cards, greetings, creative cards, creativity, egreetings, anniversary card, anniversarycard, anniversary cards, anniversarycards, dgreetings ">');
		document.write('<link rel=stylesheet href="http://www.dgreetings.com/style/style1.css" type="text/css">');
		document.write('<SCRIPT SRC="http://www.dgreetings.com/style/stylepostdatedmultiple.js"></SCRIPT>');

		//*****check for exsistence of cookie******
		document.write('</head>');
		document.write('<BODY BGCOLOR="#FFFFFF" link="#003366" vlink="#336699" text="#424242" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>');
		// ************ End of Header **************

		//************ left table*****************
		document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=128 ALIGN=left><TR><TD WIDTH=128 VALIGN=top><CENTER>');
		document.write('</CENTER></TD></TR></TABLE>'); 

		// ************ check for empty fields************ 

		if((rptname=="") || (rpteid=="") || (sdrname=="") || (sdreid=="")){
		document.write('<br><br><br><center><font size="+2" face="comic sans ms" color="red">You have missed certain data .Please check the fields marked " * ".</font></center>');
		}

		else{
		//document.write('<form method="post" action="http://www.dgreetings.com/cgi-bin/personalisesuccess.pl">');
		document.write('<form name="theform" method="post" action="http://www.dgreetings.com/cgi-bin/personalisecards.pl" onSubmit="return isValidpremail(10, document.theform.senderemail)">');
		//****************start of table *****************

		document.write('<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=0 WIDTH=467><TR>');

		//****************start of hidden fields*****************

		document.write('<TD colspan=2><input type="hidden" name="suffix" value="'+suffix+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="perfix" value="'+perfix+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="recipient0" value="'+rpteid+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="to" value="'+rptname+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="senderemail" value="'+sdreid+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="realname" value="'+sdrname+'">');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2>');
		//header();
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><br><font color="navy">Enter Message:</font><br><textarea name="message" value="" cols=50 rows=2 wrap="virtual" ></textarea>');
		document.write('</td></tr>');
		document.write('<tr><TD colspan=2><input type="hidden" name="file" value="'+imagename+'">');
		document.write('</td></tr>');

		//********************user defined background color************

		document.write('<tr><td><font color="navy">Select the Background Colour:</font></td><td><select name="bgcolor" >');
		document.write('<option value="">');
		document.write('<option value="black">Black');
		document.write('<option value="blue">Blue');
		document.write('<option value="cyan">Cyan');
		document.write('<option value="darkblue">Dark Blue');
		document.write('<option value="darkgreen">Dark Green');
		document.write('<option value="darkred">Dark Red');
		document.write('<option value="gray">Gray');
		document.write('<option value="green">Green');
		document.write('<option value="magenta">Magenta');
		document.write('<option value="orange">Orange');
		document.write('<option value="pink">Pink');
		document.write('<option value="purple">Purple');
		document.write('<option value="red">Red');
		document.write('<option value="yellow">Yellow');
		document.write('<option value="white">White');

		document.write('</select></td></tr>');

		//***********user defined text color *************

		document.write('<tr><td><font color="navy">Select the Text Colour:</font></td><td><select name="fgcolor">');

		document.write('<option value="">');
		document.write('<option value="black">Black');
		document.write('<option value="blue">Blue');
		document.write('<option value="cyan">Cyan');
		document.write('<option value="darkblue">Dark Blue');
		document.write('<option value="darkgreen">Dark Green');
		document.write('<option value="darkred">Dark Red');
		document.write('<option value="gray">Gray');
		document.write('<option value="green">Green');
		document.write('<option value="magenta">Magenta');
		document.write('<option value="orange">Orange');
		document.write('<option value="pink">Pink');
		document.write('<option value="purple">Purple');
		document.write('<option value="red">Red');
		document.write('<option value="yellow">Yellow');
		document.write('<option value="white">White');
		document.write('</select></td></tr>');

		//****************datetime*************

		document.write('<tr><td COLSPAN="2">')
		document.write('<table><tr><td>')
		document.write('<font size="-1" face="Arial" color="#b20010">To send the card on the future date click the checkbox and select the desired date.</font>')
		document.write('</td></tr>')
		document.write('</TABLE>')
		document.write('</td></tr>')
		document.write('<tr><td COLSPAN="2">')
		document.write('<TABLE BGCOLOR="#000080"><tr><td>')
		document.write('<input type=checkbox name="dateselected">')
		document.write('</td><td>')


		var xyz_mm = get_month_options();
		var xyz_dd = get_day_options();
		var xyz_yy = get_year_options();

		document.write('<select name="month1">')
		document.write(xyz_mm);
		document.write('</select>')
		document.write('</td>')
		document.write('<td>')
		document.write('<select name="day1">')
		document.write(xyz_dd);
		document.write('</select>')
		document.write('</td>')
		document.write('<td>')
		document.write('<select name="year1">')
		document.write(xyz_yy);
		document.write('</select>')


		document.write('</td></tr></table></center></p>');
		document.write('</td></tr>')


		// **************preview checkbox and submit button******************
		document.write('<tr><td colspan="2" align="center"><input type="Submit" value="Send Card" name="submit">&nbsp&nbsp<input type="submit" value="Preview" name="Preview" ></td>');

		document.write('</tr>');

		//****************end of table******************

		document.write('</table></form>');

		//*****************closing brace for else condition*******

		}
		// ************ start of footer************** 
		document.write('<br>');
		document.write('</body></html>');

		window.location.reload(); //*********closing brace for the personalised function*********

	}
	else
	{
		//return false;
	}

}



function newpostdatedcardform(imagename)
{

//document.write('<script language="javascript" src="http://www.dgreetings.com/dserv/sendaddress"></script>');

document.write('<FORM METHOD=POST name="theform" ACTION="http://www.dgreetings.com/cgi-bin/card2.cgi" onSubmit="return isValidpremail(10, document.theform.senderemail)">');


document.write('<CENTER>');
document.write('<TABLE CELLPADDING=0 CELLSPACING=1 WIDTH=270 BORDER=0 bgcolor="#999999">');

document.write('<TR>');
document.write('<TD colspan=3><input type="hidden" name="file" value="'+imagename+'" MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD colspan=3 valign=top align=left bgcolor="#DDDDDD"><FONT SIZE=-1 color="black"><b>Dear Users</b>\,</font><br></TD>');

document.write('</TR>');
document.write('<TR>');
document.write('<TD colspan=3 valign=top bgcolor="#DDDDDD"><FONT SIZE=-1 color="black">Select an image to send as a prefix or suffix along with your message.The icon selected by you will appear&nbsp;&nbsp; 1)next to the receivers name if you "prefix" it &nbsp;&nbsp;2)before senders name if you "suffix" it.The choice is entirely yours</font><br></TD>');

document.write('</TR>');
document.write('<TR>');
document.write('<TD colspan=3 valign=top align=center bgcolor="FFFFFF"><table width=270 bgcolor="FFFFFF" CELLSPACING=1><tr><td width=70>&nbsp;</td><td><img src="http://www.dgreetings.com/newimages/homegif/holi1.gif"  border="0" alt=""></td><td><img src="http://www.dgreetings.com/newimages/homegif/holi2.gif"  border="0" alt=""></td><td><img src="http://www.dgreetings.com/newimages/homegif/holi3.gif"  border="0" alt=""></td><td><img src="http://www.dgreetings.com/newimages/homegif/prefix1.gif"  border="0" alt=""></td><td><img src="http://www.dgreetings.com/newimages/homegif/prefix2.gif"  border="0" alt=""></td><td><img src="http://www.dgreetings.com/newimages/homegif/prefix3.gif"  border="0" alt=""></td></tr></table></TD>');

document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=3 valign=top align=center bgcolor="FFFFFF"><table width=270 bgcolor="FFFFFF"><tr><td bgcolor="FFFFFF"><FONT color="black"><b>Prefix</b></font>&nbsp;</td><td><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/holi1.gif"></input></td><td><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/holi2.gif"></input></td><td><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/holi3.gif"></input></td><td align=right><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/prefix1.gif"></input></td><td align=right><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/prefix2.gif"></input></td><td align=right><input type=radio name=r1 value="http://www.dgreetings.com/newimages/homegif/prefix3.gif"></input></td></tr></table></TD>');

document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=3 valign=top align=center bgcolor="FFFFFF"><table width=270 bgcolor="FFFFFF"><tr><td ><FONT color="black"><b>Suffix</b></font>&nbsp;</td><td><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/holi1.gif"></input></td><td><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/holi2.gif"></input></td><td><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/holi3.gif"></input></td><td align=right><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/prefix1.gif"></input></td><td align=right><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/prefix2.gif"></input></td><td align=right><input type=radio name=r2 value="http://www.dgreetings.com/newimages/homegif/prefix3.gif"></input></td></tr></table></TD>');

document.write('</TR>');
document.write('<TR>');
document.write('<BR><TD colspan=3 bgcolor="FFFFFF"><FONT SIZE=-1 color="blue">Personalise your card.(* Denotes a required field.)</FONT></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD width=60% bgcolor="FFFFFF">');
document.write('<table>');
document.write('<tr><td colspan=2 bgcolor="FFFFFF"><FONT SIZE=-1 color="black">Recipient\'s Email</FONT><sup>*</sup></TD>');
//document.write('<TD><input type="TEXT" name="recipient0" SIZE=30 MAXLENGTH=100 onFocus="f1();"></TD>');
document.write('<TD bgcolor="FFFFFF"><input type="TEXT" name="recipient0" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=2 bgcolor="FFFFFF"><FONT SIZE=-1 color="black">Recipient\'s Name</FONT><sup>*</sup></TD>');
document.write('<TD><input type="text" name="to" value="" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<tr><td colspan=3><input type=checkbox  name="check1" value="Dear"><FONT SIZE=3 color="black"><b>Please check the box if you want to prefix the name with Dear</b></font></td></tr>')
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="black">Sender\'s Email</FONT><sup>*</sup></TD>');
document.write('<TD bgcolor="FFFFFF"><input type="TEXT" name="senderemail" SIZE=30 MAXLENGTH=100 onFocus="f2();"></TD>');
document.write('</TR>');

 
document.write('<TR>');
document.write('<TD colspan=2 bgcolor="FFFFFF"><FONT SIZE=-1 color="black">Sender\'s Name</FONT><sup>*</sup></TD>');
document.write('<TD bgcolor="FFFFFF"><input type="TEXT" name="realname" value="" SIZE=30 MAXLENGTH=100 onFocus="f2();"></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD colspan=3 bgcolor="FFFFFF"><input type="hidden" name="xyz"></TD>');
document.write('</TR>');

//****************
//**********personalise button*************
document.write('<TR>');
document.write('<TD colspan=3 bgcolor="FFFFFF"><input type="button" value="Customize UR Card" style="background-color:navy;color:white;font-weight:bold;" name="personal" onClick="personalised(r1.value,r2.value,recipient0.value,to.value,senderemail.value,realname.value,file.value );"><BR></TD>');
document.write('</TR>');

//document.write('<tr><td colspan=3><input type=checkbox  name="check1" value="Dear" onFocus="f2();">Please check the box if you want to prefix the name with Dear</td></tr>')
//******************
document.write('<TR>');
document.write('<TD colspan=3 bgcolor="FFFFFF"><BR></TD>');

document.write('</TR>');


document.write('<TR>');
document.write('<TD colspan=2 bgcolor="FFFFFF"><FONT SIZE=-1 color="black">Personal Message:<sup>1</sup></FONT></TD>');
document.write('<TD colspan=2 bgcolor="FFFFFF"><TEXTAREA NAME="message" COLS="37" ROWS="4" WRAP="virtual" value="" onFocus="f2();"></textarea></TD>');
document.write('</TR>');

 // ************ SUBMIT BUTTON FOR SINGLE RECIEPIENT*******************

//onClick="vali(document.theform.recipient1.value ,document.theform.recipient2.value ,document.theform.recipient3.value ,theform.recipient4.value , document.theform.recipient5.value,document.theform.recipient6.value,document.theform.recipient7.value,document.theform.recipient8.value,document.theform.recipient9.value,document.theform.recipient10.value);"

document.write('<TR>');
document.write('<TD bgcolor="FFFFFF"><INPUT TYPE="SUBMIT" NAME="action" VALUE="send Card" style="background-color:navy;color:white;font-weight:bold;" ></TD>');
//************************ PREVIEW OF CARD BEEING SEND *******************

document.write('<TD bgcolor="FFFFFF"><input type="Button" name="pre" value="Preview" style="background-color:navy;color:white;font-weight:bold;" onClick="newpreview1(document.theform.to.value, document.theform.realname.value, document.theform.message.value,document.theform.recipient0.value, document.theform.senderemail.value, file.value);"></td>'); 

//document.write('<TD bgcolor="FFFFFF"><input type="Button" name="pre" value="Preview" style="background-color:navy;color:white;font-weight:bold;" onClick="newpreview1(document.theform.to.value, document.theform.realname.value, document.theform.message.value,document.theform.recipient.value, document.theform.senderemail.value, file.value);"></td>'); 


//document.write('<TD><input type="Button" name="pre" value="Preview" onClick="newpreview(document.theform.to.value, document.theform.realname.value, document.theform.message.value, file.value);"></td>'); 
document.write('</TR>');
//********************** END OF PREVIEW *******************

//*********** Post Dated Submission of card *********

document.write('<tr><td COLSPAN="3">')
document.write('<table bgcolor="FFFFFF"><tr><td>')
document.write('<font size="-1" face="Arial" color="black">To send the card on the future date click the checkbox and select the desired date.</font>')
document.write('</td></tr>')
document.write('</TABLE>')
document.write('</td></tr>')
document.write('<tr><td COLSPAN="3">')
document.write('<TABLE BGCOLOR="#000080"><tr><td>')
document.write('<input type=checkbox name="dateselected">')
document.write('</td><td>')

var xyz_mm = get_month_options();
var xyz_dd = get_day_options();
var xyz_yy = get_year_options();

document.write('<select name="month">')
document.write(xyz_mm);
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="day">')
document.write(xyz_dd);
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="year">')
document.write(xyz_yy);
document.write('</select>')


document.write('</td></tr></table></center></p>');
document.write('</td></tr>')

document.write('<TR>');
document.write('<td colspan=3><br><FONT SIZE=-1 color="black">For the multiple dispatch of this Card, fill in the E-mail addresses below and press any "Send Card" Button.</FONT><br><br>');
document.write('</TR>');



document.write('<TR>');
document.write('<TD COLSPAN=2><FONT SIZE=-1 color="black">Recipient\'s Email<sup>2</sup></FONT></TD>');
document.write('<TD><FONT SIZE=-1 color="black">Recipient\'s Name</FONT></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient1" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to1" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient2" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="text" name="to2"  SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient3" SIZE=25 MAXLENGTH=100></FONT></TD>');
document.write('<TD><input type="TEXT" name="to3"  SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient4" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to4" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient5" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to5" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient6" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to6" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient7" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to7" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient8" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to8" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient9" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to9" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');
document.write('<TR>');
document.write('<TD COLSPAN=2><input type="TEXT" name="recipient10" SIZE=25 MAXLENGTH=100></TD>');
document.write('<TD><input type="TEXT" name="to10" SIZE=25 MAXLENGTH=100></TD>');
document.write('</TR>');

//*********
document.write('<TR><td colspan=3><input type="hidden" name="number" value=""></td>');
document.write('</TR>');


//*************************personalised button***********************

//document.write('<tr>');
//document.write('<td colspan=3><input type="button" name="personal" value="Personalise" onClick="personalised(document.forms[0].elements[1].value ,document.forms[0].elements[2].value ,document.forms[0].elements[3].value ,document.forms[0].elements[4].value , file.value);">');
//document.write('</td>');
//document.write('</tr>');

//onClick="vali(document.theform.recipient1.value ,document.theform.recipient2.value ,document.theform.recipient3.value ,theform.recipient4.value , document.theform.recipient5.value,document.theform.recipient6.value,document.theform.recipient7.value,document.theform.recipient8.value,document.theform.recipient9.value,document.theform.recipient10.value);"

//*********** SUBMIT AND RESET BUTTONS OF MULTIPLE DISPATCH *********
document.write('<TR>');
document.write('<TD COLSPAN=3><INPUT TYPE="SUBMIT" NAME="action" VALUE="Send Card" style="background-color:navy;color:white;font-weight:bold;" > &nbsp;&nbsp;<INPUT TYPE="RESET" NAME="Reset" VALUE="Clear All" style="background-color:navy;color:white;font-weight:bold;"></TD>');

document.write('</TR>');

document.write('<TR>');
document.write('</TR>');

document.write('</TABLE>');
document.write('</center>');

document.write('<TABLE CELLPADDING=0 CELLSPACING=6 WIDTH=400 BORDER=0 >');
document.write('<TR align=left>');
document.write('<TD align=right valign=top><FONT SIZE=1 color="#B01C5F">NOTE:</FONT></TD>');
document.write('<TD valign=top align=left><FONT SIZE=1 color="black">1</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=1 color="black">Incase of multiple dispatch the message goes to every recipient.</FONT></TD>');
document.write('</TR>');



document.write('<TR>');
document.write('<TD></TD>');
document.write('<TD valign=top><FONT SIZE=1 color="black">2</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=1 color="black">You can enter multiple recipient\'s email in a single email field by separating the e-mail names with ","</FONT></TD>'); 
document.write('</TR>');
document.write('</table></form>');
document.write('</td>');
document.write('<td width=50% valign=top>');
document.write('<form name="fm">');
document.write('<div id=dv></div>');
document.write('</form></td></tr>');

document.write('</TABLE>');





//*********closing brace of cardform **********

}
function newpreview(rname,sname,msg1,card){

	//prompt("Reciepient Name:",rname);
	//prompt("Senders Name:",sname);
	//prompt("Message:",message);
	
	//prompt("Card:",card);
	var path1="http://www.dgreetings.com/newimages/";
	//var path2="../images/";
	//var path=path2+card;
	var path=path1+card;
	//prompt("the path is",path);	
	//document.images[0].src=path
	
		if((card=="animation10.gif") || (card=="animation6.gif") || 				(card=="animation4.gif") || (card=="animation3.gif") || 				(card=="animation9.gif") || (card=="animation5.gif") || 				(card=="animation8.gif") || (card=="animation7.gif") || 
				(card=="animation.gif") || (card=="animation12a.gif") ||
                                                                (card=="animation14a.gif") || (card=="animation15a.gif") ||
                                                                (card=="animation17.gif ") || (card=="animation2.gif")){
       document.write('<p align=center>Dear:	'+rname);
	document.write('<br>');
	document.write('<br><br>');
	
	document.write(msg1);
	
	document.write('<br><br>');
	document.write('<center><img width=320 height=320 src="'+path+ '"></center>')
	document.write('<br><br>');
	document.write('<center>From:	'+sname);
	document.write('<br><br>');
	document.write('<form>');
	document.write('<input type="button" value="Return" onClick="history.back();">');
	document.write('</form>');
	document.write('</center>');
						
												}

	else{ 
          document.write('<p align=center>Dear:	'+rname);
	document.write('<br>');
	document.write('<br><br>');
	
	document.write(msg1);
	
	document.write('<br><br>');
	document.write('<center><img src="'+path+ '"></center>');
	document.write('<br><br>');
	document.write('<center>From:	'+sname);
	document.write('<br><br><BR><BR>');
	document.write('<form>');
	document.write('<input type="button" value="Return" onClick="history.back();">');
	document.write('</form>');
	document.write('</center>');
	  }
}




////////////////////////





function newpreview1(rname,sname,msg1,remail,semail,card)
{
	/////check recipent email ////
	x=window.document.theform.recipient0.value;
	if(!isBlank(x)) 
	{
		if(isValidEmail(x)) 
		{
		
		}
		else 
		{ 
			alert("Please Enter Valid Recipient E-mail");
			window.document.theform.recipient0.focus();
			return false;
		}
	}
	else
	{
			alert("Please Enter The Recipient E-mail");
			window.document.theform.recipient0.focus();
			return false;
	
	}//end if


	x=window.document.theform.to.value;
	if(!isBlank(x)) 
	{
	}
	else
	{
			alert("Please Enter The s Name");
			window.document.theform.to.focus();
			return false;
	
	}//end if




	
	////check sender email ////////////////////
	x=window.document.theform.senderemail.value;
	if(!isBlank(x)) 
	{
		if(isValidEmail(x)) 
		{
		
		}
		else 
		{ 
			alert("Please Enter Valid Sender E-mail");
			window.document.theform.senderemail.focus();
			return false;
		}
	}
	else
	{
			alert("Please Enter The Sender E-mail");
			window.document.theform.senderemail.focus();
			return false;
	
	}//end if


	x=window.document.theform.realname.value;
	if(!isBlank(x)) 
	{
	}
	else
	{
			alert("Please Enter The Sender's Name");
			window.document.theform.realname.focus();
			return false;
	
	}//end if


	var val="";
	var val1="";
	var kris1="";
	//prompt("Reciepient Name:",rname);
	//prompt("Senders Name:",sname);
	//prompt("Message:",message);
	for(i=0;i<5;i++)
	{
		if (eval("window.document.theform.r1["+i+"].checked==true"))
		{
			val=window.document.theform.r1[i].value;
		}
	}
		//alert(val);
	for(i=0;i<5;i++)
	{
		if (eval("window.document.theform.r2["+i+"].checked==true"))
		{
			val1=window.document.theform.r2[i].value;
		}
	}
	if (eval("window.document.theform.check1.checked==true"))
	{
	kris1=window.document.theform.check1.value;

	}
	
	//prompt("Card:",card);
	var path1="http://www.dgreetings.com/newimages/";
	//var path2="../images/";
	var path=path1+card;
	//alert(path);
	
	var str_dv_content ="";
	str_dv_content+=('<SCRIPT SRC="http://www.dgreetings.com/style/stylepostdatedmultiple.js"></SCRIPT><br>');

	
		
		if((card=="animation10.gif") || (card=="animation6.gif") || 				(card=="animation4.gif") || (card=="animation3.gif") || 				(card=="animation9.gif") || (card=="animation5.gif") || 				(card=="animation8.gif") || (card=="animation7.gif") || 
				(card=="animation.gif") || (card=="animation12a.gif") ||
                                                                (card=="animation14a.gif") || (card=="animation15a.gif") ||
                                                                (card=="animation17.gif ") || (card=="animation2.gif")){

	str_dv_content+=('<br>');
	str_dv_content+=('<br><br>');
	
	
	str_dv_content+=("<form name='theform' action=\"http://www.dgreetings.com/cgi-bin/card2.cgi\" method=\"post\" onSubmit=\"return isValidpremail(10, document.theform.senderemail)\"><table align=center border=0 cellspacing=0 cellpadding=0 width=100% background='http://www.dgreetings.com/newimages/newhome/backdiwali.jpg'><tr><td width=143><a href='http://www.dgreetings.com/'><img src='http://www.dgreetings.com/newimages/home/new/dglogo1.gif' width=144 height=77 alt=dgreetings.com border=0></a></td><td align=right width=612 valign=bottom><table border=0 cellpadding=0 cellspacing=0><tr ><td align=right><img src='http://www.dgreetings.com/newimages/home/new/cardpreview1.gif' width=186 height=46 border=0 alt='Card Preview'></td></tr></TABLE><table WIDTH=100%><tr><td height=10></td></tr></table><table width=100%><tr><td align=center background='http://www.dgreetings.com/newimages/newhome/cardsend.jpg' height=25><table width=90%><tr><td width=20% align=center valign=middle><a href='http://www.dgreetings.com/birthday_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Birthdays</u></b></font></a></td><td width=20% align=center><a href='http://www.dgreetings.com/love_romance_cards/love_you_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Love You</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/just_like_that_cards/good_morning/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Goodmorning</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/anniversary/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Anniversary</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/love_romance_cards/valentine_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Valentine</u></b></font></td></tr></table></td></tr></table></td></tr><tr><td align=center valign=bottom colspan=2><br><br><font color=#980810 size=+1><b>Send Your Greeting!</b></font><br><br></td></tr><tr><td align=center colspan=2>");
str_dv_content+=( "<center><table cellspacing=0 cellpadding=0 border=1 bordercolor=#E90708 align=center><tr><td><table  cellpadding=5 cellspacing=0 border=0 width=600 align=center>");
str_dv_content+= ("<tr valign=top><td width=600 align=center>");
str_dv_content+= ("<center><font size=4 face=comic sans ms>");
if ("window.document.theform.check1.checked")
{
str_dv_content+=('<p align=center>Dear	'+rname);
}
else
{
str_dv_content+=('<p align=center>	'+rname);
}
str_dv_content+=('<center><img src="'+val+ '"></center>');
//str_dv_content+=('<center><img src="'+path+ '"></center>');
str_dv_content+=("</td></tr><tr><td><center>");

str_dv_content+=(msg1);


str_dv_content+=('<center><img src="'+val1+ '"></center>');
str_dv_content+=('</center>From:	'+sname);
str_dv_content+=("</td></tr><tr><td align=right><font size=2 face=\"comic sans ms\"><b>Publisher:dgreetings.com</b></font>");
str_dv_content+=("<br clear=all>");
str_dv_content+=("</td></tr></table></td></tr></table></td></tr></table></center>");
str_dv_content+=( "<p><center><table cellpadding=5 cellspacing=0 border=0 width=\"600\">");

str_dv_content+=('<form>');
	str_dv_content+=('<input type="button" value="Return" onClick="history.back();">');
	str_dv_content+=('</form>');

str_dv_content+=("</td></tr></table></center>");


}


	else{ 
         str_dv_content+=("<form name=\"theform\" action=\"http://www.dgreetings.com/cgi-bin/card2.cgi\" method=\"post\" onSubmit=\"return isValidpremail(10, document.theform.senderemail)\"><table align=center border=0 cellspacing=0 cellpadding=0 width=100% background='http://www.dgreetings.com/newimages/newhome/backdiwali.jpg'><tr><td width=143><a href='http://www.dgreetings.com/'><img src='http://www.dgreetings.com/newimages/home/new/dglogo1.gif' width=144 height=77 alt=dgreetings.com border=0></a></td><td align=right width=612 valign=bottom><table border=0 cellpadding=0 cellspacing=0><tr ><td align=right><img src='http://www.dgreetings.com/newimages/home/new/cardpreview1.gif' width=186 height=46 border=0 alt='Card Preview'></td></tr></TABLE><table WIDTH=100%><tr><td height=10></td></tr></table><table width=100%><tr><td align=center background='http://www.dgreetings.com/newimages/newhome/cardsend.jpg' height=25><table width=90%><tr><td width=20% align=center valign=middle><a href='http://www.dgreetings.com/birthday_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Birthdays</u></b></font></a></td><td width=20% align=center><a href='http://www.dgreetings.com/love_romance_cards/love_you_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Love You</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/just_like_that_cards/good_morning/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Goodmorning</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/anniversary/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Anniversary</u></b></font></td><td width=20% align=center><a href='http://www.dgreetings.com/love_romance_cards/valentine_cards/index.html' target='_blank'><font size=2 color=yellow face='verdana'><b><u>Valentine</u></b></font></td></tr></table></td></tr></table></td></tr><tr><td align=center valign=bottom colspan=2><br><br><font color=#980810 size=+1><b>Send Your Greeting!</b></font><br><br></td></tr><tr><td align=center colspan=2>");
str_dv_content+=( "<center><table cellspacing=0 cellpadding=0 border=1 bordercolor=#E90708 align=center><tr><td><table  cellpadding=5 cellspacing=0 border=0 width=600 align=center>");



str_dv_content+=('<input type=hidden name="to" value="'+ rname+ '">');
str_dv_content+=('<input type=hidden name="realname" value="'+ sname+ '">');
str_dv_content+=('<input type=hidden name="recipient0" value="'+ remail+ '">');
str_dv_content+=('<input type=hidden name="senderemail" value="'+ semail+ '">');

str_dv_content+=('<input type="hidden" name="xyz">');


str_dv_content+=('<input type=hidden name="file" value="'+card+ '">');
str_dv_content+=('<input type=hidden name="message" value="'+ msg1+ '">');
str_dv_content+= ("<tr valign=top><td width=600 align=center>");
//str_dv_content+=('<input type=hidden value=\"$Config{'dateselected'}\" name=\"dateselected\">');
//str_dv_content+=('<input type=hidden value=\"$Config{'month1'}\" name=\"month1\">');
//str_dv_content+=('<input type=hidden value=\"$Config{'day1'}\" name=\"day1\">');
//str_dv_content+=('<input type=hidden value=\"$Config{'year1'}\" name=\"year1\">');

str_dv_content+= ("<center><font size=4 face=comic sans ms>");
//if (eval("window.document.theform.check1.checked==true"))
//{
//val=window.document.theform.check1.value;
//alert(kris);
//str_dv_content+=('<p align=center>Dear:	'+rname);
//}
//else
//{

if(kris1=="Dear")
{
str_dv_content+=('<p align=center>Dear '+rname);
}
else
{
str_dv_content+=('<p align=center> '+rname);
}
if(val=="")
{}
else{
str_dv_content+=('<img src="'+val+ '">');
}
str_dv_content+=('<center><img src="'+path+ '"></center>');
str_dv_content+=("</center></td></tr><tr><td><center>");

str_dv_content+=(msg1);
str_dv_content+=('</center><br>');


if(val1=="")
{}
else{
str_dv_content+=('<img src="'+val1+ '">');
}
str_dv_content+=('From:	'+sname);
str_dv_content+=("</td></tr><tr><td align=right><font size=2 face=\"comic sans ms\"><b>Publisher:dgreetings.com</b></font>");
str_dv_content+=("<br clear=all>");
str_dv_content+=('</td></tr></table></td></tr></table><br><input type=submit value="Send Immediately"><input type=button value="Cancel" onclick="javascript:history.back(-1);"></td></tr><tr><td colspan=2 align=center><font size="2" color="red" face=verdana><b>To send the card on the future date click the checkbox and select the desired date:</b></font></td></tr>');
str_dv_content+=('<tr><td align=center colspan=2>')
str_dv_content+=('<TABLE border=0><tr><td>')
str_dv_content+=('<input type=checkbox name="dateselected">')
str_dv_content+=('</td><td>')

var xyz_mm = get_month_options();
var xyz_dd = get_day_options();
var xyz_yy = get_year_options();

str_dv_content+=('<select name="month">')
str_dv_content+=(xyz_mm);
str_dv_content+=('</select>')
str_dv_content+=('</td>')
str_dv_content+=('<td>')
str_dv_content+=('<select name="day">')
str_dv_content+=(xyz_dd);
str_dv_content+=('</select>')
str_dv_content+=('</td>')
str_dv_content+=('<td>')
str_dv_content+=('<select name="year">')
str_dv_content+=(xyz_yy);
str_dv_content+=('</select>')

/*
str_dv_content+=('<select name="month">')



str_dv_content+=('<option value="November">November')
str_dv_content+=('<option value="December">December')
str_dv_content+=('<option value="January">January')
str_dv_content+=('<option value="February">February')
str_dv_content+=('<option value="March">March')
str_dv_content+=('<option value="April">April')
str_dv_content+=('<option value="May">May')

str_dv_content+=('</select>')
str_dv_content+=('</td>')
str_dv_content+=('<td>')
str_dv_content+=('<select name="day">')
str_dv_content+=('<option value="1">1')
str_dv_content+=('<option value="2">2')
str_dv_content+=('<option value="3">3')
str_dv_content+=('<option value="4">4')
str_dv_content+=('<option value="5">5')
str_dv_content+=('<option value="6">6')
str_dv_content+=('<option value="7">7')
str_dv_content+=('<option value="8">8')
str_dv_content+=('<option value="9">9')
str_dv_content+=('<option value="10">10')
str_dv_content+=('<option value="11">11')
str_dv_content+=('<option value="12">12')
str_dv_content+=('<option value="13">13')
str_dv_content+=('<option value="14">14')
str_dv_content+=('<option value="15">15')
str_dv_content+=('<option value="16">16')
str_dv_content+=('<option value="17">17')
str_dv_content+=('<option value="18">18')
str_dv_content+=('<option value="19">19')
str_dv_content+=('<option value="20">20')
str_dv_content+=('<option value="21">21')
str_dv_content+=('<option value="22">22')
str_dv_content+=('<option value="23">23')
str_dv_content+=('<option value="24">24')
str_dv_content+=('<option value="25">25')
str_dv_content+=('<option value="26">26')
str_dv_content+=('<option value="27">27')
str_dv_content+=('<option value="28">28')
str_dv_content+=('<option value="29">29')
str_dv_content+=('<option value="30">30')
str_dv_content+=('<option value="31">31')
str_dv_content+=('</select>')


str_dv_content+=('</td>')
str_dv_content+=('<td>')
str_dv_content+=('<select name="year">')
str_dv_content+=('<option value="2004" selected>2004')
str_dv_content+=('<option value="2005">2005')
str_dv_content+=('</select>')
*/

str_dv_content+=('</td><td><input type=image src="http://www.dgreetings.com/images/go.gif"></td></tr></table></center></p>');
str_dv_content+=('</td></tr></table></center>')
str_dv_content+=('<table align=center width=100%><TR>');
str_dv_content+=('<td colspan=3 align=center width=100%><br><FONT SIZE=-1 color="blue">For the Multiple Dispatch of this Card, fill in the E-mail addresses below and press any "Send Card" Button.</FONT><br><br>');
str_dv_content+=('</TR>');



str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><FONT SIZE=-1 color="navy">Recipient\'s Email<sup>2</sup></FONT></TD>');
str_dv_content+=('<TD><FONT SIZE=-1 color="navy">Recipient\'s Name</FONT></TD>');
str_dv_content+=('</TR>');

str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient1" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to1" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');

str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient2" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="text" name="to2"  SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');

str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient3" SIZE=25 MAXLENGTH=100></FONT></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to3"  SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');

str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient4" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to4" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');

str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient5" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to5" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');
str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient6" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to6" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');
str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient7" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to7" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');
str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient8" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to8" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');
str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient9" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to9" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');
str_dv_content+=('<TR>');
str_dv_content+=('<TD align=right><input type="TEXT" name="recipient10" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('<TD><input type="TEXT" name="to10" SIZE=25 MAXLENGTH=100></TD>');
str_dv_content+=('</TR>');



//*********
str_dv_content+=('<TR><td colspan=3 align=center><input type="hidden" name="number" value=""></td>');
str_dv_content+=('</TR>');


//*************************personalised button***********************

//str_dv_content+=('<tr>');
//str_dv_content+=('<td colspan=3><input type="button" name="personal" value="Personalise" onClick="personalised(document.forms[0].elements[1].value ,document.forms[0].elements[2].value ,document.forms[0].elements[3].value ,document.forms[0].elements[4].value , file.value);">');
//str_dv_content+=('</td>');
//str_dv_content+=('</tr>');


//*********** SUBMIT AND RESET BUTTONS OF MULTIPLE DISPATCH *********
str_dv_content+=('<TR>');
str_dv_content+=('<TD COLSPAN=3 align=center><INPUT TYPE="SUBMIT" NAME="action" VALUE="Send Card" ');

//onClick="vali(document.theform.recipient1.value ,document.theform.recipient2.value ,document.theform.recipient3.value ,theform.recipient4.value , document.theform.recipient5.value,document.theform.recipient6.value,document.theform.recipient7.value,document.theform.recipient8.value,document.theform.recipient9.value,document.theform.recipient10.value);"

str_dv_content+= ('"> &nbsp;&nbsp;<INPUT TYPE="RESET" NAME="Reset" VALUE="Clear All"></TD>');

str_dv_content+=('</TR></table></center></form>')
}

	document.write(str_dv_content);


window.location.reload();
}






