//----soundcard technology---------
function soundcardform(imagename,soundfile)
{
document.write('<FORM METHOD=POST name="sound" 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="recipient" 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 **********

}

//************number of pages for holi

function isValidpremailold(e1,e2,e3,e4,e5,e6,e7){
	email=new Array(e1,e2,e3,e4,e5,e6,e7);
		for (j=0; j<7 ; 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 isValidpremail(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 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="recipient" 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){
	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;



//*************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;
}




function header11() {

//*******outer table**********
document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR valign="top">')
document.write('<TD>')
//******inner table*********
login()
document.write('<td valign="middle" align="center">')
randomb()

//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('<br><a href="http://www.mydearvalentine.com/valentine/lovecalculator/index.html" target="_blank" class="left"><font size="2"  face="Arial" color="Navy"><b>Love Calculator</b></font></a>&nbsp;&nbsp;<a href="http://www.mydearvalentine.com/valentine/flames/flames1.html" target="_blank"><font size="2"  face="Arial" color="navy"><b>Flames</b></font></a>&nbsp;&nbsp;<a href="http://www.mydearvalentine.com/valentine/lovehoroscopes/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Horoscope</b></font></a>&nbsp;&nbsp;<a href="http://www.mydearvalentine.com/valentine/lovequotations/index.html" target="_blank"><font size="2" color="navy" face="Arial"><b>Love&nbsp;Quotations</b></font></a></td><td valign="top" align="right"><img src="http://www.dgreetings.com/newimages/home/new/dglogo.gif" width=119 height=67 border=0 alt="Dgreetings.com"></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){

//*********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">');


//*****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">Sie haben irgendwelche Daten vergessen. Bitte prüfen Sie Felder markiert mit " * ".</font></center>');
}

else{
//document.write('<form method="post" action="http://www.dgreetings.com/cgi-bin/personalisesuccess.pl">');
document.write('<form method="post" action="http://de.dgreetings.com/cgi-bin/personalisecardspv.pl">');
//****************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="recipient" 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">Ihre Mitteilung:</font><br><textarea name="message" value="" cols=50 rows=10 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">W&auml;hlen Sie sich die Hintergrund-Farbe aus: </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">W&auml;hlen Sie sich die Text-Farbe aus: </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">um die Karte auf dem zukünftigen Datum zu senden klicken Sie das checkbox und wählen Sie das gewünschte Datum aus.</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>')
document.write('<select name="month1">')
document.write('<option value="Juni">Juni')
document.write('<option value="Juli">Juli')
document.write('<option value="August">August')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="day1">')
document.write('<option value="1">1')
document.write('<option value="2">2')
document.write('<option value="3">3')
document.write('<option value="4">4')
document.write('<option value="5">5')
document.write('<option value="6">6')
document.write('<option value="7">7')
document.write('<option value="8">8')
document.write('<option value="9">9')
document.write('<option value="10">10')
document.write('<option value="11">11')
document.write('<option value="12">12')
document.write('<option value="13">13')
document.write('<option value="14">14')
document.write('<option value="15">15')
document.write('<option value="16">16')
document.write('<option value="17">17')
document.write('<option value="18">18')
document.write('<option value="19">19')
document.write('<option value="20">20')
document.write('<option value="21">21')
document.write('<option value="22">22')
document.write('<option value="23">23')
document.write('<option value="24">24')
document.write('<option value="25">25')
document.write('<option value="26">26')
document.write('<option value="27">27')
document.write('<option value="28">28')
document.write('<option value="29">29')
document.write('<option value="30">30')
document.write('<option value="31">31')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="year1">')
document.write('<option value="2001" selected>2001')
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="Karte Schicken" name="submit">&nbsp&nbsp<input type="submit" value="Vorschau" name="Preview" ></td>');

document.write('</tr>');

//****************end of table******************

document.write('</table></form>');

//*****************closing brace for else condition*******

}
// ************ start of footer************** 
document.write('<br clear=all>');
document.write('</body></html>');

//*********closing brace for the personalised function*********
}

function newpostdatedcardform(imagename)
{


	document.write('<FORM METHOD=post name="theform" ACTION="http://de.dgreetings.com/php-bin/sendECards.php" ONSUBMIT="return _blkcheckCardForm(this);">');

	document.write('<CENTER>');
	document.write('<TABLE CELLPADDING=3 CELLSPACING=0 WIDTH=450 BORDER=0 style="border:1px solid #70B0F8;">');
	document.write('<INPUT TYPE="hidden" name=referer value="'+ window.location +'">');
	document.write('<tr>');
	document.write('<td bgcolor="#70B0F8" colspan="2"><font color="#000000" face="arial" size="3"><b>Versenden Sie diese Grußkarte </b></font> <font color="#000000" face="arial" size="1"><br>(Einfach füllen Sie die folgenden Felder aus)</font></td>');
	document.write('</tr>');

	//***********************************Sender Details***************************************************8

	document.write('<tr>');
	document.write('<td bgcolor="#C0E0FF" colspan="2"><font color="#000000" face="verdana" size="2"><b>Angaben des Absenders:</b></font></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td colspan="2" style="color:#000000; font-family:arial;font-size:12px;">Von:</td>');
	document.write('</tr>');
	document.write('</tr>');
	//Sender Name:
	//Sender E-Mail:
	
	document.write('<tr>');
	document.write('<td style="color:#000000; font-family:arial;font-size:12px;">Name:&nbsp;<input type="text" name="sender_name" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="sender_email" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	
	/*document.write('<tr>');
	document.write('<td></td><td><input type="text" name="sender_email" style="width:200;height=20;border:1px solid"></td>');
	document.write('</tr>');*/

	//***********************************Recipient Details***************************************************8

	document.write('<tr>');
	document.write('<td bgcolor="#C0E0FF" colspan="2"><font color="#000000" face="verdana" size="2"><b>Angaben des Empfängers:</b></font></td>');
	document.write('</tr>');

	document.write('<tr>');
	document.write('<td style="color:#000000; font-family:arial;font-size:12px;">Anzahl der Empfänger:</td>');
	document.write('<td><select name=no_of_recipients onChange="changeMultiple();">');
	document.write('<option value=1>1</option>		<option value=2>2</option>		<option value=3>3</option>	<option value=4>4</option>		<option value=5>5</option>		<option value=6>6</option>	<option value=7>7</option>		<option value=8>8</option>		<option value=9>9</option>	<option value=10>10</option><!--	<option value=11>11</option>	<option value=12>12</option>	<option value=13>13</option>	<option value=14>14</option>	<option value=15>15</option>	<option value=16>16</option>	<option value=17>17</option>	<option value=18>18</option>	<option value=19>19</option>	<option value=20>20</option>	<option value=21>21</option>	<option value=22>22</option>	<option value=23>23</option>	<option value=24>24</option>	<option value=25>25</option>-->	</select>&nbsp;<font color="#000000" face="arial" size="1">[Versenden Sie diese Grußkarte an bis &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zu 10 Empfänger.]</font></td>');
	document.write('</tr>');
	
	document.write('<tr>');
	document.write('<td colspan="2" style="color:#000000; font-family:arial;font-size:12px;">An:</td>');
	document.write('</tr>');
	//document.write('</tr>');
	
	/////// Changes implemented by Mrs. Anjeeta Manish Bhatti on 9th Jan to incorporate Multiple Recipients ///////

	//Recipient Name and Email
	document.write('<tr id=rname1>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(1) Name:&nbsp;<input type="text" name="recipient_name1" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">E-Mail:&nbsp;<input type="text" name="recipient_email1" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname2 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(2) Name:&nbsp;<input type="text" name="recipient_name2" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email2" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');
	
	document.write('<tr id=rname3 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(3) Name:&nbsp;<input type="text" name="recipient_name3" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email3" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname4 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(4) Name:&nbsp;<input type="text" name="recipient_name4" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email4" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname5 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(5) Name:&nbsp;<input type="text" name="recipient_name5" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email5" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname6 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(6) Name:&nbsp;<input type="text" name="recipient_name6" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email6" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname7 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(7) Name:&nbsp;<input type="text" name="recipient_name7" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email7" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname8 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(8) Name:&nbsp;<input type="text" name="recipient_name8" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email8" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');
	
	document.write('<tr id=rname9 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(9) Name:&nbsp;<input type="text" name="recipient_name9" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email9" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');

	document.write('<tr id=rname10 style=display:none>');
	document.write('<td nowrap style="color:#000000; font-family:arial;font-size:12px;">(10) Name:&nbsp;<input type="text" name="recipient_name10" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></font></td><td style="color:#000000; font-family:arial;font-size:12px;">Email:&nbsp;<input type="text" name="recipient_email10" style="width:140;height=20;border:1px solid; color:#000000; font-family:arial;font-size:12px;"></td>');
	document.write('</tr>');
	//////////////////////////////////////////////////////////////////////////////////////////////////////////
	//document.write('<tr>');
	//document.write('<td><font color="#000000" face="verdana" size="2">&nbsp;Email:</font></td><td><input type="text" name="recipient_email" style="width:200;height=20;border:1px solid"></td>');
	//document.write('</tr>');
	
	document.write('<tr height=2>');
	document.write('<td colspan="2"></td>');
	document.write('</tr>');

	//Message
	document.write('<tr>');
	document.write('<td bgcolor="#C0E0FF" colspan="2"><font color="#000000" face="verdana" size="2"><b>Ihre persönliche Nachricht:</b></font></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td colspan="2" style="color:#000000; font-family:arial;font-size:12px;">Nachricht:</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td align=center colspan="2" style="padding-right:5px;"> <TEXTAREA NAME="message" ROWS="30" COLS="5" style="width:410;height=50;border:1px solid"></TEXTAREA></td>');
	document.write('</tr>');
	
	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="2" align="center"><br><center><INPUT TYPE="submit" name="send" value="Ahora Envíe" style="border:1px solid" onclick="//return validate(this.form);">&nbsp;&nbsp;<INPUT TYPE="button" name="preview" value="Inspección Previo" style="border:1px solid" onclick="newpreview(document.theform.recipient_name1.value, document.theform.sender_name.value, document.theform.message.value, file.value);"></center><br></td>');
	document.write('<td colspan="2" align="center"><br><center><INPUT TYPE="submit" name="send" value="Sofort senden" style="border:1px solid" onclick="//return validate(this.form);">&nbsp;&nbsp;<INPUT TYPE="button" name="preview" value="Vorschau" style="border:1px solid" onclick="previewCard(this.form);"></center><br></td>');
	document.write('</tr>');

	//Postponded date
	document.write('<tr>');
	document.write('<td bgcolor="#C0E0FF" colspan="2"><font color="#000000" face="verdana" size="2"><b>oder Versanddatum wählen:</b></font></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td style="color:#000000; font-family:arial;font-size:12px;">Am:</td>');
	document.write('<td><SELECT NAME="post_date" style="width:100;height=20;border:1px solid">');

	getList();

	document.write('</SELECT>&nbsp;&nbsp;<input type="submit" name="submit_post" value="Senden" style="border:1px solid" onclick="//return validate(this.form);">');
	document.write('</td>');
	document.write('</tr>');
	//document.write('<tr>');
	//document.write('<td><font color="#000000" face="verdana" size="2">Envíe Encendido:</font></td><td><input type=text name="datebox" size=15><a href="javascript:show_calendar();"> <img src="../../images/show-calendar.gif" width=24 height=22 border=0></a></td>');
	//document.write('</tr>');
	
	document.write('</TABLE>');
}
function getList()
{
	var myDate=new Date();
	myDate.setDate(myDate.getDate()+1);
	var month1=myDate.getMonth()+1;
	document.write('<option value="'+myDate.getDate()+'-'+month1+'-'+myDate.getYear()+'" selected>'+myDate.getDate()+'-'+month1+'-'+myDate.getYear()+'</option>' );

	var myDate1=new Date();
	myDate1.setDate(myDate1.getDate()+2);
	var month2=myDate1.getMonth()+1;
	document.write('<option value="'+myDate1.getDate()+'-'+month2+'-'+myDate1.getYear()+'">'+myDate1.getDate()+'-'+month2+'-'+myDate1.getYear()+'</option>');

	var myDate2=new Date();
	myDate2.setDate(myDate2.getDate()+3);
	var month3=myDate2.getMonth()+1;
	document.write('<option value="'+myDate2.getDate()+'-'+month3+'-'+myDate2.getYear()+'">'+myDate2.getDate()+'-'+month3+'-'+myDate2.getYear()+'</option>');

	var myDate3=new Date();
	myDate3.setDate(myDate3.getDate()+4);
	var month4=myDate3.getMonth()+1;
	document.write('<option value="'+myDate3.getDate()+'-'+month4+'-'+myDate3.getYear()+'">'+myDate3.getDate()+'-'+month4+'-'+myDate3.getYear()+'</option>');

	var myDate4=new Date();
	myDate4.setDate(myDate4.getDate()+5);
	var month5=myDate4.getMonth()+1;
	document.write('<option value="'+myDate4.getDate()+'-'+month5+'-'+myDate4.getYear()+'">'+myDate4.getDate()+'-'+month5+'-'+myDate4.getYear()+'</option>');

	var myDate5=new Date();
	myDate5.setDate(myDate5.getDate()+6);
	var month6=myDate5.getMonth()+1;
	document.write('<option value="'+myDate5.getDate()+'-'+month6+'-'+myDate5.getYear()+'">'+myDate5.getDate()+'-'+month6+'-'+myDate5.getYear()+'</option>');

	var myDate6=new Date();
	myDate6.setDate(myDate6.getDate()+7);
	var month7=myDate6.getMonth()+1;
	document.write('<option value="'+myDate6.getDate()+'-'+month7+'-'+myDate6.getYear()+'">'+myDate6.getDate()+'-'+month7+'-'+myDate6.getYear()+'</option>');

	var myDate7=new Date();
	myDate7.setDate(myDate7.getDate()+8);
	var month8=myDate7.getMonth()+1;
	document.write('<option value="'+myDate7.getDate()+'-'+month8+'-'+myDate7.getYear()+'">'+myDate7.getDate()+'-'+month8+'-'+myDate7.getYear()+'</option>');

	var myDate8=new Date();
	myDate8.setDate(myDate8.getDate()+9);
	var month9=myDate8.getMonth()+1;
	document.write('<option value="'+myDate8.getDate()+'-'+month9+'-'+myDate8.getYear()+'">'+myDate8.getDate()+'-'+month9+'-'+myDate8.getYear()+'</option>');

	var myDate9=new Date();
	myDate9.setDate(myDate9.getDate()+10);
	var month10=myDate9.getMonth()+1;
	document.write('<option value="'+myDate9.getDate()+'-'+month10+'-'+myDate9.getYear()+'">'+myDate9.getDate()+'-'+month10+'-'+myDate9.getYear()+'</option>');

	var myDate10=new Date();
	myDate10.setDate(myDate10.getDate()+11);
	var month11=myDate10.getMonth()+1;
	document.write('<option value="'+myDate10.getDate()+'-'+month11+'-'+myDate10.getYear()+'">'+myDate10.getDate()+'-'+month11+'-'+myDate10.getYear()+'</option>');

	var myDate11=new Date();
	myDate11.setDate(myDate11.getDate()+12);
	var month12=myDate11.getMonth()+1;
	document.write('<option value="'+myDate11.getDate()+'-'+myDate11.getMonth()+'-'+myDate11.getYear()+'">'+myDate11.getDate()+'-'+myDate11.getMonth()+'-'+myDate11.getYear()+'</option>');

	var myDate12=new Date();
	myDate12.setDate(myDate12.getDate()+13);
	var month13=myDate12.getMonth()+1;
	document.write('<option value="'+myDate12.getDate()+'-'+month12+'-'+myDate12.getYear()+'">'+myDate12.getDate()+'-'+month12+'-'+myDate12.getYear()+'</option>');

	var myDate13=new Date();
	myDate13.setDate(myDate13.getDate()+14);
	var month14=myDate13.getMonth()+1;
	document.write('<option value="'+myDate13.getDate()+'-'+month14+'-'+myDate13.getYear()+'">'+myDate13.getDate()+'-'+month14+'-'+myDate13.getYear()+'</option>');

	var myDate14=new Date();
	myDate14.setDate(myDate14.getDate()+15);
	var month15=myDate14.getMonth()+1;
	document.write('<option value="'+myDate14.getDate()+'-'+month15+'-'+myDate14.getYear()+'">'+myDate14.getDate()+'-'+month15+'-'+myDate14.getYear()+'</option>');

	var myDate15=new Date();
	myDate15.setDate(myDate15.getDate()+16);
	var month16=myDate15.getMonth()+1;
	document.write('<option value="'+myDate15.getDate()+'-'+month16+'-'+myDate15.getYear()+'">'+myDate15.getDate()+'-'+month16+'-'+myDate15.getYear()+'</option>');

	var myDate16=new Date();
	myDate16.setDate(myDate16.getDate()+17);
	var month17=myDate16.getMonth()+1;
	document.write('<option value="'+myDate16.getDate()+'-'+month17+'-'+myDate16.getYear()+'">'+myDate16.getDate()+'-'+month17+'-'+myDate16.getYear()+'</option>');

	var myDate17=new Date();
	myDate17.setDate(myDate17.getDate()+18);
	var month18=myDate17.getMonth()+1;
	document.write('<option value="'+myDate17.getDate()+'-'+month18+'-'+myDate17.getYear()+'">'+myDate17.getDate()+'-'+month18+'-'+myDate17.getYear()+'</option>');

	var myDate18=new Date();
	myDate18.setDate(myDate18.getDate()+19);
	var month19=myDate18.getMonth()+1;
	document.write('<option value="'+myDate18.getDate()+'-'+month19+'-'+myDate18.getYear()+'">'+myDate18.getDate()+'-'+month19+'-'+myDate18.getYear()+'</option>');

	var myDate19=new Date();
	myDate19.setDate(myDate19.getDate()+20);
	var month20=myDate19.getMonth()+1;
	document.write('<option value="'+myDate19.getDate()+'-'+month20+'-'+myDate19.getYear()+'">'+myDate19.getDate()+'-'+month20+'-'+myDate19.getYear()+'</option>');

	var myDate20=new Date();
	myDate20.setDate(myDate20.getDate()+21);
	var month21=myDate20.getMonth()+1;
	document.write('<option value="'+myDate20.getDate()+'-'+month21+'-'+myDate20.getYear()+'">'+myDate20.getDate()+'-'+month21+'-'+myDate20.getYear()+'</option>');

	var myDate21=new Date();
	myDate21.setDate(myDate21.getDate()+22);
	var month22=myDate21.getMonth()+1;
	document.write('<option value="'+myDate21.getDate()+'-'+month22+'-'+myDate21.getYear()+'">'+myDate21.getDate()+'-'+month22+'-'+myDate21.getYear()+'</option>');

	var myDate22=new Date();
	myDate22.setDate(myDate22.getDate()+23);
	var month23=myDate22.getMonth()+1;
	document.write('<option value="'+myDate22.getDate()+'-'+month23+'-'+myDate22.getYear()+'">'+myDate22.getDate()+'-'+month23+'-'+myDate22.getYear()+'</option>');

	var myDate23=new Date();
	myDate23.setDate(myDate23.getDate()+24);
	var month24=myDate23.getMonth()+1;
	document.write('<option value="'+myDate23.getDate()+'-'+month24+'-'+myDate23.getYear()+'">'+myDate23.getDate()+'-'+month24+'-'+myDate23.getYear()+'</option>');

	var myDate24=new Date();
	myDate24.setDate(myDate24.getDate()+25);
	var month25=myDate24.getMonth()+1;
	document.write('<option value="'+myDate24.getDate()+'-'+month25+'-'+myDate24.getYear()+'">'+myDate24.getDate()+'-'+month25+'-'+myDate23.getYear()+'</option>');

	var myDate25=new Date();
	myDate25.setDate(myDate25.getDate()+26);
	var month26=myDate25.getMonth()+1;
	document.write('<option value="'+myDate23.getDate()+'-'+month26+'-'+myDate23.getYear()+'">'+myDate23.getDate()+'-'+month26+'-'+myDate23.getYear()+'</option>');

	var myDate26=new Date();
	myDate26.setDate(myDate26.getDate()+24);
	var month27=myDate26.getMonth()+1;
	document.write('<option value="'+myDate26.getDate()+'-'+month27+'-'+myDate26.getYear()+'">'+myDate26.getDate()+'-'+month27+'-'+myDate26.getYear()+'</option>');

	var myDate27=new Date();
	myDate27.setDate(myDate27.getDate()+27);
	var month28=myDate27.getMonth()+1;
	document.write('<option value="'+myDate27.getDate()+'-'+month28+'-'+myDate27.getYear()+'">'+myDate27.getDate()+'-'+month28+'-'+myDate27.getYear()+'</option>');

	var myDate28=new Date();
	myDate28.setDate(myDate28.getDate()+28);
	var month29=myDate28.getMonth()+1;
	document.write('<option value="'+myDate28.getDate()+'-'+month29+'-'+myDate28.getYear()+'">'+myDate28.getDate()+'-'+month29+'-'+myDate28.getYear()+'</option>');

	var myDate29=new Date();
	myDate29.setDate(myDate29.getDate()+29);
	var month30=myDate29.getMonth()+1;
	document.write('<option value="'+myDate29.getDate()+'-'+month30+'-'+myDate29.getYear()+'">'+myDate29.getDate()+'-'+month30+'-'+myDate29.getYear()+'</option>');

}
function email(field)
{
	var filter=/^[a-zA-Z][a-zA-Z0-9]*(\.?\w)*@[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*(\.?\w)*$/;
	if(!filter.test(field))
	{
		return false;
	}
	else
	{
		return true;
	}
}

function character(field)
{
	var filter=/^\D+$/;
	if(!filter.test(field))
	{
		return false;
	}
	else
	{
		return true;
	}
}


function validate(frm)
{
	var e1=character(frm.sender_name.value);
	var e2=email(frm.sender_email.value);
	var e3=character(frm.recipient_name.value);
	var e4=email(frm.recipient_email.value);
	if((e1==false)||(e2==false)||(e3==false)||(e4==false))
	{
		if(e1==false)
		{
			alert("Bitte geben Sie Ihren Namen ein!");
			frm.sender_name.focus();
			return false;
		}
		if(e2==false)
		{
			alert("Bitte geben Sie Ihre (gültige) E-Mail Adresse ein!");
			frm.sender_email.focus();
			return false;
		}
		if(e3==false)
		{
			alert("Bitte geben Sie Empfänger Namen ein!");
			frm.recipient_name.focus();
			return false;
		}
		if(e4==false)
		{
			alert("Bitte geben Sie (gültige) Empfänger E-Mail Adresse ein!");
			frm.recipient_email.focus();
			return false;
		}

	}
}


/* THREE STEPS TO INSTALL POPUP DATE PICKER:

  1.  Copy the code into a new file, save as date-picker.js
  2.  Add the script source tag to the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->


<!-- STEP ONE: Copy this code into a new file, save as date-picker.js  -->

<!-- Original:  Kedar R. Bhave (softricks@hotmail.com) -->
<!-- Web Site:  http://www.softricks.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com --> */

var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;

var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;

Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];

// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
	if ((p_month == null) && (p_year == null))	return;

	if (p_WinCal == null)
		this.gWinCal = ggWinCal;
	else
		this.gWinCal = p_WinCal;
	
	if (p_month == null) {
		this.gMonthName = null;
		this.gMonth = null;
		this.gYearly = true;
	} else {
		this.gMonthName = Calendar.get_month(p_month);
		this.gMonth = new Number(p_month);
		this.gYearly = false;
	}

	this.gYear = p_year;
	this.gFormat = p_format;
	this.gBGColor = "white";
	this.gFGColor = "black";
	this.gTextColor = "black";
	this.gHeaderColor = "black";
	this.gReturnItem = p_item;
}

Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;

function Calendar_get_month(monthNo) {
	return Calendar.Months[monthNo];
}

function Calendar_get_daysofmonth(monthNo, p_year) {
	/* 
	Check for leap year ..
	1.Years evenly divisible by four are normally leap years, except for... 
	2.Years also evenly divisible by 100 are not leap years, except for... 
	3.Years also evenly divisible by 400 are leap years. 
	*/
	if ((p_year % 4) == 0) {
		if ((p_year % 100) == 0 && (p_year % 400) != 0)
			return Calendar.DOMonth[monthNo];
	
		return Calendar.lDOMonth[monthNo];
	} else
		return Calendar.DOMonth[monthNo];
}

function Calendar_calc_month_year(p_Month, p_Year, incr) {
	/* 
	Will return an 1-D array with 1st element being the calculated month 
	and second being the calculated year 
	after applying the month increment/decrement as specified by 'incr' parameter.
	'incr' will normally have 1/-1 to navigate thru the months.
	*/
	var ret_arr = new Array();
	
	if (incr == -1) {
		// B A C K W A R D
		if (p_Month == 0) {
			ret_arr[0] = 11;
			ret_arr[1] = parseInt(p_Year) - 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) - 1;
			ret_arr[1] = parseInt(p_Year);
		}
	} else if (incr == 1) {
		// F O R W A R D
		if (p_Month == 11) {
			ret_arr[0] = 0;
			ret_arr[1] = parseInt(p_Year) + 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) + 1;
			ret_arr[1] = parseInt(p_Year);
		}
	}
	
	return ret_arr;
}

function Calendar_print() {
	ggWinCal.print();
}

function Calendar_calc_month_year(p_Month, p_Year, incr) {
	/* 
	Will return an 1-D array with 1st element being the calculated month 
	and second being the calculated year 
	after applying the month increment/decrement as specified by 'incr' parameter.
	'incr' will normally have 1/-1 to navigate thru the months.
	*/
	var ret_arr = new Array();
	
	if (incr == -1) {
		// B A C K W A R D
		if (p_Month == 0) {
			ret_arr[0] = 11;
			ret_arr[1] = parseInt(p_Year) - 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) - 1;
			ret_arr[1] = parseInt(p_Year);
		}
	} else if (incr == 1) {
		// F O R W A R D
		if (p_Month == 11) {
			ret_arr[0] = 0;
			ret_arr[1] = parseInt(p_Year) + 1;
		}
		else {
			ret_arr[0] = parseInt(p_Month) + 1;
			ret_arr[1] = parseInt(p_Year);
		}
	}
	
	return ret_arr;
}

// This is for compatibility with Navigator 3, we have to create and discard one object before the prototype object exists.
new Calendar();

Calendar.prototype.getMonthlyCalendarCode = function() {
	var vCode = "";
	var vHeader_Code = "";
	var vData_Code = "";
	
	// Begin Table Drawing code here..
	vCode = vCode + "<TABLE BORDER=1 BGCOLOR=\"" + this.gBGColor + "\">";
	
	vHeader_Code = this.cal_header();
	vData_Code = this.cal_data();
	vCode = vCode + vHeader_Code + vData_Code;
	
	vCode = vCode + "</TABLE>";
	
	return vCode;
}

Calendar.prototype.show = function() {
	var vCode = "";
	
	this.gWinCal.document.open();

	// Setup the page...
	this.wwrite("<html>");
	this.wwrite("<head><title>Calendar</title>");
	this.wwrite("</head>");

	this.wwrite("<body " + 
		"link=\"" + this.gLinkColor + "\" " + 
		"vlink=\"" + this.gLinkColor + "\" " +
		"alink=\"" + this.gLinkColor + "\" " +
		"text=\"" + this.gTextColor + "\">");
	this.wwriteA("<FONT FACE='" + fontface + "' SIZE=2><B>");
	this.wwriteA(this.gMonthName + " " + this.gYear);
	this.wwriteA("</B><BR>");

	// Show navigation buttons
	var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
	var prevMM = prevMMYYYY[0];
	var prevYYYY = prevMMYYYY[1];

	var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
	var nextMM = nextMMYYYY[0];
	var nextYYYY = nextMMYYYY[1];
	
	this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
		");" +
		"\"><<<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\"><<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\">><\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
		");" +
		"\">>><\/A>]</TD></TR></TABLE><BR>");

	// Get the complete calendar code for the month..
	vCode = this.getMonthlyCalendarCode();
	this.wwrite(vCode);

	this.wwrite("</font></body></html>");
	this.gWinCal.document.close();
}

Calendar.prototype.showY = function() {
	var vCode = "";
	var i;
	var vr, vc, vx, vy;		// Row, Column, X-coord, Y-coord
	var vxf = 285;			// X-Factor
	var vyf = 200;			// Y-Factor
	var vxm = 10;			// X-margin
	var vym;				// Y-margin
	if (isIE)	vym = 75;
	else if (isNav)	vym = 25;
	
	this.gWinCal.document.open();

	this.wwrite("<html>");
	this.wwrite("<head><title>Calendar</title>");
	this.wwrite("<style type='text/css'>\n<!--");
	for (i=0; i<12; i++) {
		vc = i % 3;
		if (i>=0 && i<= 2)	vr = 0;
		if (i>=3 && i<= 5)	vr = 1;
		if (i>=6 && i<= 8)	vr = 2;
		if (i>=9 && i<= 11)	vr = 3;
		
		vx = parseInt(vxf * vc) + vxm;
		vy = parseInt(vyf * vr) + vym;

		this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}");
	}
	this.wwrite("-->\n</style>");
	this.wwrite("</head>");

	this.wwrite("<body " + 
		"link=\"" + this.gLinkColor + "\" " + 
		"vlink=\"" + this.gLinkColor + "\" " +
		"alink=\"" + this.gLinkColor + "\" " +
		"text=\"" + this.gTextColor + "\">");
	this.wwrite("<FONT FACE='" + fontface + "' SIZE=2><B>");
	this.wwrite("Year : " + this.gYear);
	//this.wwrite("</B><BR>");
	// Show navigation buttons
	var prevYYYY = parseInt(this.gYear) - 1;
	var nextYYYY = parseInt(this.gYear) + 1;
	
	this.wwrite("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', null, '" + prevYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");
	this.wwrite("[<A HREF=\"" +
		"javascript:window.opener.Build(" + 
		"'" + this.gReturnItem + "', null, '" + nextYYYY + "', '" + this.gFormat + "'" +
		");" +
		"\">>><\/A>]</TD></TR></TABLE><BR>");

	// Get the complete calendar code for each month..
	var j;
	for (i=11; i>=0; i--) {
		if (isIE)
			this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");
		else if (isNav)
			this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");

		this.gMonth = i;
		this.gMonthName = Calendar.get_month(this.gMonth);
		vCode = this.getMonthlyCalendarCode();
		this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>");
		this.wwrite(vCode);

		if (isIE)
			this.wwrite("</DIV>");
		else if (isNav)
			this.wwrite("</LAYER>");
	}

	this.wwrite("</font><BR></body></html>");
	this.gWinCal.document.close();
}

Calendar.prototype.wwrite = function(wtext) {
	this.gWinCal.document.writeln(wtext);
}

Calendar.prototype.wwriteA = function(wtext) {
	this.gWinCal.document.write(wtext);
}

Calendar.prototype.cal_header = function() {
	var vCode = "";
	
	vCode = vCode + "<TR>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sun</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Mon</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Tue</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Wed</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Thu</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='14%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Fri</B></FONT></TD>";
	vCode = vCode + "<TD WIDTH='16%'><FONT SIZE='2' FACE='" + fontface + "' COLOR='" + this.gHeaderColor + "'><B>Sat</B></FONT></TD>";
	vCode = vCode + "</TR>";
	
	return vCode;
}

Calendar.prototype.cal_data = function() {
	var vDate = new Date();
	vDate.setDate(1);
	vDate.setMonth(this.gMonth);
	vDate.setFullYear(this.gYear);

	var vFirstDay=vDate.getDay();
	var vDay=1;
	var vLastDay=Calendar.get_daysofmonth(this.gMonth, this.gYear);
	var vOnLastDay=0;
	var vCode = "";

	/*
	Get day for the 1st of the requested month/year..
	Place as many blank cells before the 1st day of the month as necessary. 
	*/

	vCode = vCode + "<TR>";
	for (i=0; i<vFirstDay; i++) {
		vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(i) + "><FONT SIZE='2' FACE='" + fontface + "'> </FONT></TD>";
	}

	// Write rest of the 1st week
	for (j=vFirstDay; j<7; j++) {
		vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" + 
			"<A HREF='#' " + 
				"onClick=\"self.opener.document." + this.gReturnItem + ".value='" + 
				this.format_data(vDay) + 
				"';window.close();\">" + 
				this.format_day(vDay) + 
			"</A>" + 
			"</FONT></TD>";
		vDay=vDay + 1;
	}
	vCode = vCode + "</TR>";

	// Write the rest of the weeks
	for (k=2; k<7; k++) {
		vCode = vCode + "<TR>";

		for (j=0; j<7; j++) {
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j) + "><FONT SIZE='2' FACE='" + fontface + "'>" + 
				"<A HREF='#' " + 
					"onClick=\"self.opener.document." + this.gReturnItem + ".value='" + 
					this.format_data(vDay) + 
					"';window.close();\">" + 
				this.format_day(vDay) + 
				"</A>" + 
				"</FONT></TD>";
			vDay=vDay + 1;

			if (vDay > vLastDay) {
				vOnLastDay = 1;
				break;
			}
		}

		if (j == 6)
			vCode = vCode + "</TR>";
		if (vOnLastDay == 1)
			break;
	}
	
	// Fill up the rest of last week with proper blanks, so that we get proper square blocks
	for (m=1; m<(7-j); m++) {
		if (this.gYearly)
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + 
			"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'> </FONT></TD>";
		else
			vCode = vCode + "<TD WIDTH='14%'" + this.write_weekend_string(j+m) + 
			"><FONT SIZE='2' FACE='" + fontface + "' COLOR='gray'>" + m + "</FONT></TD>";
	}
	
	return vCode;
}

Calendar.prototype.format_day = function(vday) {
	var vNowDay = gNow.getDate();
	var vNowMonth = gNow.getMonth();
	var vNowYear = gNow.getFullYear();

	if (vday == vNowDay && this.gMonth == vNowMonth && this.gYear == vNowYear)
		return ("<FONT COLOR=\"RED\"><B>" + vday + "</B></FONT>");
	else
		return (vday);
}

Calendar.prototype.write_weekend_string = function(vday) {
	var i;

	// Return special formatting for the weekend day.
	for (i=0; i<weekend.length; i++) {
		if (vday == weekend[i])
			return (" BGCOLOR=\"" + weekendColor + "\"");
	}
	
	return "";
}

Calendar.prototype.format_data = function(p_day) {
	var vData;
	var vMonth = 1 + this.gMonth;
	vMonth = (vMonth.toString().length < 2) ? "0" + vMonth : vMonth;
	var vMon = Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();
	var vFMon = Calendar.get_month(this.gMonth).toUpperCase();
	var vY4 = new String(this.gYear);
	var vY2 = new String(this.gYear.substr(2,2));
	var vDD = (p_day.toString().length < 2) ? "0" + p_day : p_day;

	switch (this.gFormat) {
		case "MM\/DD\/YYYY" :
			vData = vMonth + "\/" + vDD + "\/" + vY4;
			break;
		case "MM\/DD\/YY" :
			vData = vMonth + "\/" + vDD + "\/" + vY2;
			break;
		case "MM-DD-YYYY" :
			vData = vMonth + "-" + vDD + "-" + vY4;
			break;
		case "MM-DD-YY" :
			vData = vMonth + "-" + vDD + "-" + vY2;
			break;

		case "DD\/MON\/YYYY" :
			vData = vDD + "\/" + vMon + "\/" + vY4;
			break;
		case "DD\/MON\/YY" :
			vData = vDD + "\/" + vMon + "\/" + vY2;
			break;
		case "DD-MON-YYYY" :
			vData = vDD + "-" + vMon + "-" + vY4;
			break;
		case "DD-MON-YY" :
			vData = vDD + "-" + vMon + "-" + vY2;
			break;

		case "DD\/MONTH\/YYYY" :
			vData = vDD + "\/" + vFMon + "\/" + vY4;
			break;
		case "DD\/MONTH\/YY" :
			vData = vDD + "\/" + vFMon + "\/" + vY2;
			break;
		case "DD-MONTH-YYYY" :
			vData = vDD + "-" + vFMon + "-" + vY4;
			break;
		case "DD-MONTH-YY" :
			vData = vDD + "-" + vFMon + "-" + vY2;
			break;

		case "DD\/MM\/YYYY" :
			vData = vDD + "\/" + vMonth + "\/" + vY4;
			break;
		case "DD\/MM\/YY" :
			vData = vDD + "\/" + vMonth + "\/" + vY2;
			break;
		case "DD-MM-YYYY" :
			vData = vDD + "-" + vMonth + "-" + vY4;
			break;
		case "DD-MM-YY" :
			vData = vDD + "-" + vMonth + "-" + vY2;
			break;

		default :
			vData = vMonth + "\/" + vDD + "\/" + vY4;
	}

	return vData;
}

function Build(p_item, p_month, p_year, p_format) {
	var p_WinCal = ggWinCal;
	gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);

	// Customize your Calendar here..
	gCal.gBGColor="white";
	gCal.gLinkColor="black";
	gCal.gTextColor="black";
	gCal.gHeaderColor="darkgreen";

	// Choose appropriate show function
	if (gCal.gYearly)	gCal.showY();
	else	gCal.show();
}

function show_calendar() {
	/* 
		p_month : 0-11 for Jan-Dec; 12 for All Months.
		p_year	: 4-digit year
		p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
		p_item	: Return Item.
	*/
//alert(frm.name);
	p_item = arguments[0];
	//alert(p_item);
	if (arguments[1] == null)
		p_month = new String(gNow.getMonth());
	else
		p_month = arguments[1];
	if (arguments[2] == "" || arguments[2] == null)
		p_year = new String(gNow.getFullYear().toString());
	else
		p_year = arguments[2];
	if (arguments[3] == null)
		p_format = "MM/DD/YYYY";
	else
		p_format = arguments[3];

	vWinCal = window.open("", "Calendar", 
		"width=250,height=250,status=no,resizable=no,top=200,left=200");
	vWinCal.opener = self;
	ggWinCal = vWinCal;

	Build(p_item, p_month, p_year, p_format);

}
/*
Yearly Calendar Code Starts here
*/
function show_yearly_calendar(p_item, p_year, p_format) {
	// Load the defaults..
	if (p_year == null || p_year == "")
		p_year = new String(gNow.getFullYear().toString());
	if (p_format == null || p_format == "")
		p_format = "MM/DD/YYYY";

	var vWinCal = window.open("", "Calendar", "scrollbars=yes");
	vWinCal.opener = self;
	ggWinCal = vWinCal;

	Build(p_item, null, p_year, p_format);
}

/*
<!-- STEP TWO: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<script language="JavaScript" src="date-picker.js"></script>

</HEAD>

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

<BODY>

<center>
<form name=calform>
<input type=text name="datebox" size=15><a href="javascript:show_calendar('calform.datebox');" onmouseover="window.status='Date Picker';return true;" onmouseout="window.status='';return true;"><img src="show-calendar.gif" width=24 height=22 border=0></a>
</form>
</center>

<p><center>
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  17.17 KB -->*/


/*function newpostdatedcardform(imagename)
{
//alert(imagename);
document.write('<FORM METHOD=post name="theform" ACTION="http://192.168.1.77/dg/cgi-bin/createhtml.php" onSubmit="return isValidpremail(document.theform.recipient.value, document.theform.senderemail.value, document.theform.recipient1.value ,document.theform.recipient2.value , document.theform.recipient3.value ,document.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('<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('<TD colspan=3 valign=top align=left><FONT SIZE=-1 color="navy">Queridos usarios\,</font><br></TD>');

document.write('</TR>');
document.write('<TR>');
document.write('<TD colspan=3 valign=top><FONT SIZE=-1 color="navy">Seleciona un imagen para enviar como un prefixo o sufixo junto con tu mensaje. El icon selecionado por tí va a aparecer   1)  si quieres un prefixo antes del nombre de recipiente    2) si quieres un sufixo antes del nombre de remitente. Puedes escoger </font><br></TD>');

document.write('</TR>');
//document.write('<TR>');
//document.write('<TD colspan=3 valign=top align=center><table width=300><tr><td width=70>&nbsp;</td><td><img src="http://de.dgreetings.com/images/home/holi1.gif"  border="0" alt=""></td><td><img src="http://de.dgreetings.com/images/home/holi2.gif"  border="0" alt=""></td><td><img src="http://de.dgreetings.com/images/home/holi3.gif"  border="0" alt=""></td><td><img src="http://de.dgreetings.com/images/home/prefix1.gif"  border="0" alt=""></td><td><img src="http://de.dgreetings.com/images/home/prefix2.gif"  border="0" alt=""></td><td><img src="http://de.dgreetings.com/images/home/prefix3.gif"  border="0" alt=""></td></tr></table></TD>');

//document.write('</TR>');

//document.write('<TR>');
//document.write('<TD colspan=3 valign=top align=center><table width=300><tr><td><FONT color="blue"><b>Prefixo</b></font>&nbsp;</td><td><input type=radio name=r1 value="http://de.dgreetings.com/images/home/holi1.gif"></input></td><td><input type=radio name=r1 value="http://de.dgreetings.com/images/home/holi2.gif"></input></td><td><input type=radio name=r1 value="http://www.dgrusskarten.de/grusskarten/home/holi3.gif"></input></td><td align=right><input type=radio name=r1 value="http://de.dgreetings.com/images/home/prefix1.gif"></input></td><td align=right><input type=radio name=r1 value="http://de.dgreetings.com/images/home/prefix2.gif"></input></td><td align=right><input type=radio name=r1 value="http://de.dgreetings.com/images/home/prefix3.gif"></input></td></tr></table></TD>');

//document.write('</TR>');

//document.write('<TR>');
//document.write('<TD colspan=3 valign=top align=center><table width=300><tr><td><FONT color="blue"><b>Sufixo</b></font>&nbsp;</td><td><input type=radio name=r2 value="http://de.dgreetings.com/images/home/holi1.gif"></input></td><td><input type=radio name=r2 value="http://de.dgreetings.com/images/home/home/holi2.gif"></input></td><td><input type=radio name=r2 value="http://www.dgrusskarten.de/grusskarten/home/holi3.gif"></input></td><td align=right><input type=radio name=r2 value="http://de.dgreetings.com/images/home/prefix1.gif"></input></td><td align=right><input type=radio name=r2 value="http://de.dgreetings.com/images/home/prefix2.gif"></input></td><td align=right><input type=radio name=r2 value="http://de.dgreetings.com/images/home/prefix3.gif"></input></td></tr></table></TD>');

//document.write('</TR>');
document.write('<TR>');
document.write('<BR><TD colspan=3><FONT SIZE=-1 color="blue">Personalize tu tarjeta.(*  Denota una esfera requisitada.)</FONT></TD>');
document.write('</TR>');

//Recipient Email address
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Correo eléctronico del recipiente*</FONT><sup>*</sup></TD>');
document.write('<TD><input type="TEXT" name="recipient" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

//Recipient Name
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Namebre del recipiente</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">Por favor avergiua  si quieres prefixar el nombre con  Querido</td></tr>')

//Sender Email Address
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Correo eléctronico del remitente</FONT><sup>*</sup></TD>');
document.write('<TD><input type="TEXT" name="senderemail" SIZE=30 MAXLENGTH=100></TD>');
document.write('</TR>');

 // Sender Name
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Namebre del remitente</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><input type="hidden" name="xyz"></TD>');
document.write('</TR>');

//****************
//**********personalise button*************
//document.write('<TR>');
//document.write('<TD colspan=3><input type="button" value="Enviar cualquier imágen en la Web " name="personal" onClick="personalised(r1.value,r2.value,recipient.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">Please check the box if you want to prefix the name with Dear</td></tr>')
//******************
document.write('<TR>');
document.write('<TD colspan=3><BR></TD>');

document.write('</TR>');

// Message Body
document.write('<TR>');
document.write('<TD colspan=2><FONT SIZE=-1 color="navy">Mensaje personal:<sup>1</sup></FONT></TD>');
document.write('<TD colspan=2><TEXTAREA NAME="message" COLS="27" ROWS="2" WRAP="virtual" value=""></textarea></TD>');
document.write('</TR>');

 // ************ SUBMIT BUTTON FOR SINGLE RECIEPIENT*******************

document.write('<TR>');
//document.write('<TD 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);"></TD>');
//************************ PREVIEW OF CARD BEEING SEND *******************
document.write('<TD  align="center"><input type="Button" name="pre" value="Preview" 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><tr><td>')
document.write('<font size="-1" face="Arial" color="#b20010">Para enviar una tarjeta en la fecha de futuro  haz un clique sobre el  check box y seleciona  la fecha deseada.</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>')
document.write('<select name="month">')
document.write('<option value="September">Sept')
document.write('<option value="October">Oct')
document.write('<option value="November">Nov')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="day">')
document.write('<option value="1">1')
document.write('<option value="2">2')
document.write('<option value="3">3')
document.write('<option value="4">4')
document.write('<option value="5">5')
document.write('<option value="6">6')
document.write('<option value="7">7')
document.write('<option value="8">8')
document.write('<option value="9">9')
document.write('<option value="10">10')
document.write('<option value="11">11')
document.write('<option value="12">12')
document.write('<option value="13">13')
document.write('<option value="14">14')
document.write('<option value="15">15')
document.write('<option value="16">16')
document.write('<option value="17">17')
document.write('<option value="18">18')
document.write('<option value="19">19')
document.write('<option value="20">20')
document.write('<option value="21">21')
document.write('<option value="22">22')
document.write('<option value="23">23')
document.write('<option value="24">24')
document.write('<option value="25">25')
document.write('<option value="26">26')
document.write('<option value="27">27')
document.write('<option value="28">28')
document.write('<option value="29">29')
document.write('<option value="30">30')
document.write('<option value="31">31')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="year">')
document.write('<option value="2001" selected>2001')
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="blue">Para enviar más de una tarjeta  de esta variedad, rellena las direcciones abajo   y presiona el búton de rellenar la dirección de  E-mail abajo y presiona cualquier búton de  "Enviar Tarjeta".</FONT><br><br>');
//document.write('</TR>');



/*document.write('<TR>');
document.write('<TD COLSPAN=2><FONT SIZE=-1 color="navy">Email de recipiente l<sup></sup></FONT></TD>');
document.write('<TD><FONT SIZE=-1 color="navy">Namebre de Recipiente </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>');


//*********** SUBMIT AND RESET BUTTONS OF MULTIPLE DISPATCH *********
//document.write('<TR>');
//document.write('<TD COLSPAN=3><INPUT TYPE="SUBMIT" NAME="action" VALUE="Karte abschicken" onClick="vali(document.theform.elements[14].value ,document.theform.elements[16].value ,document.theform.elements[18].value ,document.theform.elements[20].value , document.theform.elements[22].value);"> &nbsp;&nbsp;<INPUT TYPE="RESET" NAME="Reset" VALUE="Alles L&ouml;schen"></TD>');
//document.write('<TD COLSPAN=3><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);"> &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=2 color="#B01C5F">NOTE:</FONT></TD>');
document.write('<TD valign=top align=left><FONT SIZE=2 color="#0000da">1</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=2 color="#0000da">En el caso de  varios envíos  el mensaje sera enviada a  cada recipiente.</FONT></TD>');
document.write('</TR>');



document.write('<TR>');
document.write('<TD> </TD>');
document.write('<TD valign=top><FONT SIZE=2 color="#0000da">2</FONT></TD>' );
document.write('<TD COLSPAN=2><FONT SIZE=2 color="#0000da">Puede entrar e mail de varios recipientes en un espacio único seperando los nombres con “,”. </FONT></TD>'); 
document.write('</TR>');
document.write('</TABLE>');



document.write('</FORM>');

//*********closing brace of cardform **********

} */
function previewCard(frm)
{
	frm.action = "http://de.dgreetings.com/php-bin/preview.php";
	frm.submit();
}
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("<html><head>");
	document.write('<link href="http://de.dgreetings.com/style/style1.css" rel="stylesheet" type="text/css">');
	document.write("<script language='JavaScript' src='http://de.dgreetings.com/style1.js'>");
	document.write("<!--");
	document.write("//-->");
	document.write("</script></head>");
	document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
	//document.write('<SCRIPT LANGUAGE="JavaScript">');
		header();
	//document.write('</SCRIPT>');
	document.write("<BR><BR><table style='border:1px solid #B51109;' bgcolor='#FFF2FF' width=500 height=400 align='center'><tr><td><font color='#CC0000' face='comic' size='3'><b>&nbsp;&nbsp;" + rname + " Querido,</font></b><tr><td align='center'><img src='http://de.dgreetings.com/" + card + "'></td></tr><tr><td align='center'><font color='#CC0000' face='comic' size='5'><b>" + msg1 + "</font></b></td></tr><tr><td align='right'><font color='#CC0000' face='comic' size='3'><b>De:&nbsp;&nbsp;<br>" + sname + "&nbsp;&nbsp;</font></b></td></tr></table>");
	document.write('<center><form>');
	document.write('<input type="button" value="Vuelta" onClick="history.back();">');
	document.write('</form>');
	document.write('</center>');
	document.write('<table width=799 align="center">')
	document.write('<tr><td width="200">&nbsp;</td><td colspan=2><!-- Footer Start Here-->');
				  footer();
	document.write('</td><!-- Footer  Ends Here--></tr>');
	document.write('</table>');
	document.write("</body></html>");
	 // }
}

function newpreview1(rname,sname,msg1,remail,semail,card){

//alert(card);

var val="";
var val1="";
var kris1="";
	//prompt("Reciepient Name:",rname);
	//prompt("Senders Name:",sname);
	//prompt("Message:",message);
	//alert(window.document.theform.r1[0]);
	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://de.dgreetings.com/";
	//var path2="../images/";
	var path=path1+card;
	//alert(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('<br>');
	document.write('<br><br>');
	
	
	document.write("<form action=\"http://de.dgreetings.com/cgi-bin/card2.cgi\" method=\"post\"><table align=center border=0 cellspacing=0 cellpadding=0 width=755><tr><td width=143 bgcolor='#FFFF98'><a href='http://de.dgreetings.com/home1.html'><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 bgcolor='#FFFF98'><tr ><td align=right>&nbsp;</td></tr><tr><td valign=bottom><img src='http://www.dgreetings.com/newimages/home/new/line.gif' width=612 height=14 border=0 alt=''></td></tr></table></td></tr><tr><td bgcolor=#50C8D8 colspan=2><table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr width=755><td width=243 align=right><font size=2><a href='http://www.dgreetings.com/generalcards/index.html'><font color=black>General Cards</font></a></font></td><td width=73 align=right><font size=2><a href='http://www.dgreetings.com/love/index.html'><font color=black>Love</font></a></font></td><td width=113 align=right><font size=2><a href='http://www.dgreetings.com/friend/index.html'><font color=black>Friends</font></a></font></td><td width=73 align=right><font size=2><a href='http://www.dgreetings.com/birthday/index.html'><font color=black>Birthday</font></a></font></td><td width=73 align=right><font size=2><a href='http://www.dgreetings.com/goodmorning/index.html'><font color=black>GoodMorning</font></a></font></td><td width=82 align=right></td></tr></table></td></tr><tr><td align=center valign=bottom colspan=2><br><br><font color=#980810 size=+1><b>Schicken Sie die Karte ab</b></font><br><br></td></tr><tr><td align=center colspan=2>");
document.write( "<center><table cellspacing=0 cellpadding=0 border=1 bordercolor=#D0CC30 align=center><tr><td><table  cellpadding=5 cellspacing=0 border=0 width=600 align=center>");
document.write ("<tr valign=top><td width=600 align=center>");
document.write ("<center><font size=4 face=comic sans ms>");
if ("window.document.theform.check1.checked")
{
document.write('<p align=center>Dear	'+rname);
}
else
{
document.write('<p align=center>	'+rname);
}
document.write('<center><img src="'+val+ '"></center>');
//document.write('<center><img src="'+path+ '"></center>');
document.write("</td></tr><tr><td><center>");

document.write(msg1);


document.write('<center><img src="'+val1+ '"></center>');
document.write('</center>From:	'+sname);
document.write("</td></tr><tr><td align=right><font size=2 face=\"comic sans ms\"><b>Editor:de.dgreetings.com</b></font>");
document.write("<br clear=all>");
document.write("</td></tr></table></td></tr></table></td></tr></table></center>");
document.write( "<p><center><table cellpadding=5 cellspacing=0 border=0 width=\"600\">");

document.write('<form>');
	document.write('<input type="button" value="Return" onClick="history.back();">');
	document.write('</form>');

document.write("</td></tr></table></center>");





	
						
												}

	else{ 
         document.write("<form action=\"http://de.dgreetings.com/cgi-bin/card2.cgi\" method=\"post\"><table align=center border=0 cellspacing=0 cellpadding=0 width=755><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>&nbsp;</td></tr><tr><td valign=bottom><img src='http://www.dgreetings.com/newimages/home/new/line.gif' width=612 height=14 border=0 alt=''></td></tr></table></td></tr><tr><td bgcolor=#50C8D8 colspan=2><table width=100% border=0 cellspacing=0 cellpadding=0 align=center><tr width=755><td width=203 align=right><font size=2><a href='http://de.dgreetings.com/love_you_cards/love/index.html'><font color=black>Te amo</font></a></font></td><td width=83 align=left><font size=2><a href='http://de.dgreetings.com/love_you_cards/miss_you/index.html'><font color=black>Te extraño</font></a></font></td><td width=103 align=left><font size=2><a href='http://de.dgreetings.com/weddding_cards/engagement/index.html'><font color=black>Compromiso</font></a></font></td><td width=103 align=left><font size=2><a href='http://de.dgreetings.com/at_work_cards/index.html'><font color=black>Trabajo</font></a></font></td><td width=83 align=left><font size=2><a href='http://de.dgreetings.com/friendship_cards/index.html'><font color=black>Amistad </font></a></font></td><td width=82 align=right></td></tr></table></td></tr><tr><td align=center valign=bottom colspan=2><br><br><font color=#980810 size=+1><b>Enviar tu saludos</b></font><br><br></td></tr><tr><td align=center colspan=2>");
document.write( "<center><table cellspacing=0 cellpadding=0 border=1 bordercolor=#D0CC30 align=center><tr><td><table  cellpadding=5 cellspacing=0 border=0 width=600 align=center>");



document.write('<input type=hidden name="to" value=" '+ rname+ ' ">');
document.write('<input type=hidden name="realname" value=" '+ sname+ '">');
document.write('<input type=hidden name="recipient" value=" '+ remail+ '">');
document.write('<input type=hidden name="senderemail" value=" '+ semail+ '">');

document.write('<input type="hidden" name="xyz">');


document.write('<input type=hidden name="file" value="'+card+ '">');
document.write('<input type=hidden name="message" value=" '+ msg1+ '">');
document.write ("<tr valign=top><td width=600 align=center>");
//document.write('<input type=hidden value=\"$Config{'dateselected'}\" name=\"dateselected\">');
//document.write('<input type=hidden value=\"$Config{'month1'}\" name=\"month1\">');
//document.write('<input type=hidden value=\"$Config{'day1'}\" name=\"day1\">');
//document.write('<input type=hidden value=\"$Config{'year1'}\" name=\"year1\">');

document.write ("<center><font size=4 face=comic sans ms>");
//if (eval("window.document.theform.check1.checked==true"))
//{
//val=window.document.theform.check1.value;
//alert(kris);
//document.write('<p align=center>Dear:	'+rname);
//}
//else
//{

if(kris1=="Dear")
{
document.write('<p align=center>Dear '+rname);
}
else
{
document.write('<p align=center> '+rname);
}
if(val=="")
{}
else{
document.write('<img src="'+val+ '">');
}
document.write('<center><img src="'+path+ '"></center>');
document.write("</center></td></tr><tr><td><center>");

document.write(msg1);
document.write('</center><br>');


if(val1=="")
{}
else{
document.write('<img src="'+val1+ '">');
}
document.write('De:	'+sname);
document.write("</td></tr><tr><td align=right><font size=2 face=\"comic sans ms\"><b>Editor:de.dgreetings.com</b></font>");
document.write("<br clear=all>");
document.write('</td></tr></table></td></tr></table><br><input type="Submit" value="Enviar inmediatamente"><input type="Button" value="Cancelar" onclick="history.back();"></td></tr><tr><td colspan=2 align=center><font size="3" color="maroon"><b>Para envios con fechas en adelante haz un clique aquí:</b></font></td></tr>');
document.write('<tr><td align=center colspan=2>')
document.write('<TABLE border=0><tr><td>')
document.write('<input type=checkbox name="dateselected">')
document.write('</td><td>')
document.write('<select name="month">')
document.write('<option value="September">Septiembre')
document.write('<option value="October">Octobre')
document.write('<option value="November">Noviembre')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="day">')
document.write('<option value="1">1')
document.write('<option value="2">2')
document.write('<option value="3">3')
document.write('<option value="4">4')
document.write('<option value="5">5')
document.write('<option value="6">6')
document.write('<option value="7">7')
document.write('<option value="8">8')
document.write('<option value="9">9')
document.write('<option value="10">10')
document.write('<option value="11">11')
document.write('<option value="12">12')
document.write('<option value="13">13')
document.write('<option value="14">14')
document.write('<option value="15">15')
document.write('<option value="16">16')
document.write('<option value="17">17')
document.write('<option value="18">18')
document.write('<option value="19">19')
document.write('<option value="20">20')
document.write('<option value="21">21')
document.write('<option value="22">22')
document.write('<option value="23">23')
document.write('<option value="24">24')
document.write('<option value="25">25')
document.write('<option value="26">26')
document.write('<option value="27">27')
document.write('<option value="28">28')
document.write('<option value="29">29')
document.write('<option value="30">30')
document.write('<option value="31">31')
document.write('</select>')
document.write('</td>')
document.write('<td>')
document.write('<select name="year">')
document.write('<option value="2001" selected>2001')
document.write('</select>')
document.write('</td><td><input type=image src="http://de.dgreetings.com/images/go.gif"></td></tr></table></center></p>');
document.write('</td></tr></table></center></form>')
	  }
}

function changeMultiple(){
var no_of_recipients = window.document.theform.no_of_recipients.options[window.document.theform.no_of_recipients.selectedIndex].value;
	
	/*
	if (no_of_recipients == 1) {
		window.document.pForm.header.disabled = false;
		window.document.pForm.header.value = "";
	}else{
		window.document.pForm.header.disabled = true;
		window.document.pForm.header.value = "<recipient name>,";
	}
*/

	for(i=2; i<=no_of_recipients; i++){
		window.document.getElementById("rname"+i).style.display="block";
	}
	for(j=i;j<=10;j++){
		window.document.getElementById("rname"+j).style.display="none";
		//eval("document.pForm.rname"+i+".value='';");
		//eval("document.pForm.remail"+i+".value='';");
	}
}

//////////////////////////////////////// Form Validations ///////////////////////////////////////////
function _blkcheckCardForm(frm){
	var theMessage = "Achtung! \n";
	//You forgot to enter or have wrongly entered the following :
	var noErrors = theMessage;
	var focusval = frm.sender_name;
	//check for sender name 
		if (trimAll(frm.sender_name.value).length<=0){
			theMessage+="\n Bitte geben Sie Ihren Namen ein!";
//			alert("Sorry, but sender name is missing!");
//			frm.sname.focus();
//			return(false);
		}
	//check for sender email 
		if (trimAll(frm.sender_email.value).length<=0){
			theMessage+="\n Bitte geben Sie Ihre E-Mail Adresse ein!";
//			alert("Sorry, but sender email is missing!");
//			frm.semail.focus();
//			return(false);
		}else if (!isValidEmail(trimAll(frm.sender_email.value))){		//check for sender email validity
			theMessage+="\n Bitte geben Sie Ihre gültige E-Mail Adresse ein!";
//			alert("Sorry, but sender email is incorrect!");
//			frm.semail.focus();
//			return(false);
		}

	//check for no of recipients name
		for (var r=1; r<= Number(frm.no_of_recipients.value);r++){
			if ( trimAll(eval("frm.recipient_name"+r+".value")).length<=0 ){
				theMessage+="\n Bitte geben Sie Empfänger ("+r+") Namen ein!"; //el nombre receptor falta
//				alert("Sorry, but recipient ("+r+") name is missing!");
//				eval("frm.rname"+r+".focus()");
//				return(false);
			}
		}
		//check for no of recipients email
		for (var r=1;r<=Number(frm.no_of_recipients.value);r++){
			if ( trimAll(eval("frm.recipient_email"+r+".value")).length<=0 ){
				theMessage+="\n Bitte geben Sie Empfänger ("+r+") E-Mail Adresse ein!";
//				alert("Sorry, but recipient ("+r+") email is missing!");
//				eval("frm.remail"+r+".focus()");
//				return(false);
			}
			else if ( !isValidEmail(trimAll(eval("frm.recipient_email"+r+".value")))){
				theMessage+="\n Bitte geben Sie gültige Empfänger("+r+") E-Mail Adresse ein!";
//				alert("Sorry, but recipient ("+r+") email is incorrect!");
//				eval("frm.remail"+r+".focus()");
//				return(false);
			}
		}
	//check for no of recipients email validity
//		for (var r=1;r<=Number(frm.no_of_recipients.value);r++){
//			if ( !isValidEmail(trimAll(eval("frm.remail"+r+".value")))){
//				theMessage+="\nSorry, but recipient ("+r+") email is incorrect!";
//				alert("Sorry, but recipient ("+r+") email is incorrect!");
//				eval("frm.remail"+r+".focus()");
//				return(false);
//			}
//		}

		// If no errors, submit the form
		if (theMessage == noErrors) {
			return true;
		} else {
		// If errors were found, show alert message
			alert(theMessage);
			focusval.focus();
			return false;
		}
		
		if(check_unique_emails())
		{
			return(true);
		}
		else
		{
			return false;
		}
}

function check_unique_emails()
{

	frm=document.theForm;

	/*	for (var r=1;r<=Number(frm.no_of_recipients.value);r++){
			if ( trimAll(eval("frm.rname"+r+".value")).length<=0 ){
				alert("Sorry, but recipient ("+r+") name is missing!");
				eval("frm.rname"+r+".focus()");
				return(false);
			}
		}
		//check for no of recipients email
		for (var r=1;r<=Number(frm.no_of_recipients.value);r++){
			if ( trimAll(eval("frm.remail"+r+".value")).length<=0 ){
				alert("Sorry, but recipient ("+r+") email is missing!");
				eval("frm.remail"+r+".focus()");
				return(false);
			}
		}
*/

	var num=Number(frm.no_of_recipients.value);
	var flag_mult_emails=0;
	var param_vali="";

	for(var k=1; k <= num; k++) 
	{
		var obj1 = eval("document.pForm.remail" + k);
		//alert(obj1);
		if(obj1)
		{
			param_vali = param_vali + ", " + obj1.value + "";

			x=obj1.value;
			emailArr = x.split(',');

			//alert('exist' + k)
			if(k==1 && emailArr.length>1)
			{
				flag_mult_emails=1;
			}

			if(k>1)
			{
				flag_mult_emails=1;
			}

			

		}// 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))
		{ 
			return true;
		}
		else
		{
			return false;
		}
	}
	else
	{
		return true;
	}

}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//			COMMON LIBRARY FUNCTIONS
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//function to trim the given string
function trimAll(str){
	var l=0;
	var r=str.length;
	while((ch=str.charAt(l++)) == ' ');
	while((ch=str.charAt(--r)) == ' ');
	return(l>r)?"":str.substring(l-1,r+1);
}

function isValidEmail(sFieldValue){
	var REmail=/^\S+\@[\w-]+\.[\w\.-]+$/ ;
	var str=sFieldValue;
	if(!str.match(REmail)){
		return false;
	}else{
		return true;
	}
}

function replaceAll(_sstr,_sfindWhat, _sreplaceWith)
{

	var _sTemp=new String();
	
	//alert(_sstr);

	for ( var i=0; i<_sstr.length; i++){
			if ( _sstr.charAt(i)==_sfindWhat)
				_sTemp += _sreplaceWith;
			else
				_sTemp += _sstr.charAt(i);
	}

	//alert(_sTemp);
	return _sTemp;

}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////