
	var site_path="http://pureices.com/";		//online path
	//var site_path="http://localhost/kwality";	//local path

	document.write('<SCRIPT LANGUAGE="JavaScript" SRC="' + site_path + '/dg/php-bin/dates.php"></SCRIPT>');
	var _bHasRemoved=false;
/*function val()
	{	document.pForm.method="post";
		document.pForm.action = 'http://imaginetventures.biz/sample/kwality/ecard.html';
	    document.pForm.submit();
	}
*/function sendNow()
{
	if(document.pForm.sname.value=='')
	{
	alert("Enter Sender Name");
	pForm.sname.focus();
	return false;
	}
	if(!isNaN(document.pForm.sname.value))
	{
	alert("Enter Alphabets Only");
	pForm.sname.value="";
	pForm.sname.focus();
	return false;
	}
	 if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.pForm.semail.value)))
	{
            alert("Please enter valid Email like abc@xyz.com");
			document.pForm.semail.focus();
			return false;
	}
	if(document.pForm.rname1.value=='')
	{
	alert("Enter To Name");
	pForm.rname1.focus();
	return false;
	}
	if(!isNaN(document.pForm.rname1.value))
	{
	alert("Enter Alphabets Only");
	pForm.rname1.value="";
	pForm.rname1.focus();
	return false;
	}
	 if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.pForm.remail1.value)))
	{
            alert("Please enter valid Email like sample@xyz.com");
			document.pForm.remail1.focus();
			return false;
	}
	
	if(document.pForm.header.value=='')
	{
	alert("Enter Card Header");
	pForm.header.focus();
	return false;
	}
	if(document.pForm.footer.value=='')
	{
	alert("Enter Card Footer");
	pForm.footer.focus();
	return false;
	}
	if(document.pForm.message.value=='')
	{
	alert("Enter Message");
	pForm.message.focus();
	return false;
	}
	
	
	
	
	
	var today=new Date(); //Wednesday August 04, 2005
	//alert(today);
	var year=today.getYear();
	if (year < 1000)
		year+=1900;
	var day=today.getDay();
	var month=today.getMonth();
	var daym=today.getDate();
	if (daym<10)
		daym="0"+daym;
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	
	sendDate = dayarray[day] + " " + montharray[month] + " " + daym + ", " + year;
//	alert (sendDate);
	document.pForm.sendToday.value = sendDate;
	document.pForm.action = site_path + '/designdate.php';
	document.pForm.submit();
}

/*function sendPostDated()
{
	document.pForm.action = site_path + '/dg/php-bin/dgcsp.php';
	document.pForm.submit();


}
*/
function showAndComposeCard(thumbnail, cardimage, width, height, type, category, backgroundimage, returnurl)
{
	document.write('<a name=top></a><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=center WIDTH=300>');
	//document.write('	<FORM NAME="pForm" ACTION="' + site_path + '/dg/php-bin/dgcsp.php" METHOD=POST ONSUBMIT="return _blkcheckCardForm(this);">');
	document.write('	<FORM NAME="pForm" METHOD=POST ONSUBMIT="return _blkcheckCardForm(this);">');
	document.write('						<INPUT TYPE="hidden" name=card_image value="'+cardimage+'">');
	document.write('						<INPUT TYPE="hidden" name=thumbnail value="'+thumbnail+'">');
	document.write('						<INPUT TYPE="hidden" name=width value="'+width+'">');
	document.write('						<INPUT TYPE="hidden" name=height value="'+height+'">');
	document.write('						<INPUT TYPE="hidden" name=card_type value="'+type+'">');
	document.write('						<INPUT TYPE="hidden" name=card_category value="'+category+'">');
	document.write('						<INPUT TYPE="hidden" name=return_url value="'+returnurl+'">');
	document.write('						<INPUT TYPE="hidden" name=referer value="'+window.location+'">');
	
	//CARD TABLE STARTS HERE 
	document.write('<TR>	<TD VALIGN=TOP><A NAME="top"></A>				');
	document.write('<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=700 ALIGN=CENTER BACKGROUND="'+backgroundimage+'" ID="td1">');
	document.write('<tr><td height=20></td></tr>');
	document.write('					<TR><TD ID="TODIV" ALIGN=LEFT  STYLE="padding-left:10px"><font face="Arial, Helvetica, sans-serif" size="3">Dear &lt;Friend&gt;,</font></TD></TR>');
	document.write('					<TR><TD VALIGN=TOP>');

	document.write('						<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=CENTER height=250>');
	document.write('									<TR>');
	document.write('										<TD  align=left>');
	document.write('											&nbsp;');
	document.write('										</td>');

	document.write('									</TR>');
	document.write('									<TR>');
	document.write('										<TD  CLASS=tborder>');
	if (type.toUpperCase()=="POST CARD"||type.toUpperCase()=="ANIMATION CARD"||type.toUpperCase()=="GRAND CARD" || type.toUpperCase()=="POSTCARD"||type.toUpperCase()=="ANIMATIONCARD"||type.toUpperCase()=="GRANDCARD" || type.toUpperCase()=="POST" || type.toUpperCase()=="ANIMATION" || type.toUpperCase()=="CUTE CARD" || type.toUpperCase()=="CUTECARD" || type.toUpperCase()=="ANIMATED CARD" ||type.toUpperCase()=="GRAND" )
	{
		//WIDTH="'+width+'" HEIGHT="'+height+'"
		document.write('<IMG SRC="'+cardimage+'" BORDER="0" ALT=""  width=550 height=350>');
	}else{
		
		document.write('<IMG SRC="'+cardimage+'" BORDER="0" ALT="" width=550 height=350>');
	}
	document.write('<tr><td></td></tr>');
	document.write('									</td>');
	document.write('									</tr>');
	document.write('								</TABLE>');
	
	document.write('					</td></tr>');
	document.write('					<TR><TD ID=MESSAGEDIV CLASS=ecardhead ALIGN=CENTER>');
	document.write('				<BR>Your message will appear here.<BR>');
	document.write('									Write your message in this unlimited space.');
//	document.write('								<P>&nbsp;</P>');
	document.write('						</td></TR>');
	document.write('					<TR><TD STYLE="padding-right:10px" CLASS=MESSAGE ID=FOOTERDIV ALIGN=RIGHT></TD></TR>');
	document.write('					<TR><TD ID=FROMDIV CLASS=MESSAGE STYLE="padding-right:10px" ALIGN=RIGHT><BR><BR></TD></TR>');
	document.write('	<TR><TD ID="PUBLISHERDIV"  STYLE="padding-right:10px" ALIGN=RIGHT></TD>		</TR>');
	//document.write('	<TR><TD ID="PUBLISHERDIV"  STYLE="padding-right:10px" ALIGN=RIGHT>				<font face=arial size=1>&nbsp; Copyright:pureices.com</font></TD>		</TR>');
	document.write('				</TABLE>');
	document.write('		</TD></TR>');
	//document.write('		<tr><td height=10></td></TR>');
	//CARD TABLE ENDS HERE 

	//SHOW HIDE BUTTONS
	document.write('	<TR><TD>');

	document.write('				<TABLE border=0 WIDTH=500 CELLSPACING=0  ALIGN=CENTER>');
	document.write('				<TR><TD ALIGN=RIGHT></TD></tr>');
	document.write('				<TR><TD ALIGN=RIGHT><INPUT TYPE="BUTTON" VALUE="Choose Another Card" ONCLICK="location=\'/ecard.php\';" class=button></TD> <TD ALIGN=CENTER VALIGN=TOP><INPUT TYPE="BUTTON" NAME="SHOWHIDEBTN" VALUE="Show Customize Options" ONCLICK="changeCustomizeOptions();" class=button></TD>');
	
	document.write('				</TR>');
	document.write('				</TABLE>');

	document.write('		</TD>	</TR>');
	document.write('<tr><td>&nbsp;</td></tr>');
	//SHOW HIDE BUTTONS END HERE

	document.write('<!-- =========== Customize Options Table Placed in this Row =============== -->');

	document.write('	<TR ID=OPTIONSPART STYLE=display:none>');
	document.write('		<TD width="400" align="center" style="padding-left:10px;">');

	//CUSTOMIZE CARD TABLE STARTS HERE
	document.write('<TABLE CELLPADDING=2 CELLSPACING=0 BORDER=2 ALIGN=CENTER WIDTH=700" bordercolor=#CCE0F9>');
	document.write('					<TR><TD bgcolor=#B3DBFE ALIGN=CENTER><font color=#D65478 face=Arial size=2><b> Customize your card</b></font><br><font face=verdana size=1 color=#5E3225><b> [ Note: These features are pre-selected, optional, and recommended choices. ]</b></font></td></TR>');

	document.write('					<TR><TD>');


	document.write('						<TABLE WIDTH=700 CELLPADDING=2 CELLSPACING=0 BORDER=0>');
	document.write('							<tr><td><font size=1 face=arial color="#0274B2"><b>BACKGROUND</b></font>&nbsp;[<a href="javascript:void(0);" onClick="window.open(\'background.html\', \'pureices\',\'width=500,height=100,scrollbars=0,left=150,top=80\')">Help</a>]</td><TD WIDTH=5%></TD></TR>');

	document.write('							<TR><TD COLSPAN=2>');
	//BackGround Options Table Starts Here
	document.write('								<TABLE CELLSPACING=0 CELLPADDING=1 CLASS=OPTIONSTABLE BORDER=1 WIDTH=700 algn=left bgcolor=#DBD5D3>');

	document.write('								<TR><TD><IMG SRC="'+backgroundimage+'" WIDTH="25" HEIGHT="25" BORDER="1"><BR><INPUT TYPE=RADIO NAME=BG VALUE="'+backgroundimage+'" onClick="javascript:ChangeBG(\''+backgroundimage+'\');" CHECKED></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/1.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/1.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/1.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/3.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/3.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/3.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/4.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/4.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/4.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/5.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/5.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/5.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/6.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/6.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/6.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/7.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/7.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/7.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/8.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/8.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/8.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/9.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/9.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/9.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/10.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/10.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/10.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/11.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/11.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/11.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/12.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/12.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/12.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/13.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/13.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/13.jpg\');"></td>');
	document.write('									<TD><IMG SRC="' + site_path + '/bck/14.jpg" WIDTH="25" HEIGHT="25" BORDER="1" ALT=""><BR><INPUT TYPE=RADIO NAME=BG VALUE="' + site_path + '/bck/14.jpg" onClick="javascript:ChangeBG(\'' + site_path + '/bck/14.jpg\');"></td>');
	document.write('			</TR>');

	document.write('								</TABLE>');
	document.write('							</td></TR>');
	document.write('							<tr><td height=15px;></td></tr>');
	//BackGround Options Table Ends Here

	document.write('							<TR><TD><font size=1 face=arial color="#0274B2"><b>FONT COLOR</b></font> [<a href="javascript:void(0);" onClick="window.open(\'fontcolor.html\', \'pureices\',\'width=500,height=100,scrollbars=0,left=150,top=80\')">Help</a>]</td><TD WIDTH=5%></TD></TR>');

	document.write('							<TR><TD COLSPAN=2>');
	//Font Color Options Table Starts Here
	document.write('			<table border="1" cellpadding="2" cellspacing="2" class=colorstable WIDTH=700 align=left>');
	document.write('			<TR>');
	document.write('			<td bgcolor="#000000"><input type=radio value="#000000" name=tcolor onClick="javascript:ChangeFontColor(\'#000000\');" CHECKED></td>');
	document.write('									<td bgcolor="#f0f8ff"><input type=radio value="#f0f8ff" name=tcolor onClick="javascript:ChangeFontColor(\'#f0f8ff\');"></td>');
	document.write('									<td bgcolor="#faebd7"><input type=radio value="#faebd7" name=tcolor onClick="javascript:ChangeFontColor(\'#faebd7\');"></td>');
	document.write('									<td bgcolor="#00ffff"><input type=radio value="#00ffff" name=tcolor onClick="javascript:ChangeFontColor(\'#00ffff\');"></td>');
	document.write('									<td bgcolor="#7fffd4"><input type=radio value="#7fffd4" name=tcolor onClick="javascript:ChangeFontColor(\'#7fffd4\');"></td>');
	document.write('									<td bgcolor="#f0ffff"><input type=radio value="#f0ffff" name=tcolor onClick="javascript:ChangeFontColor(\'#f0ffff\');"></td>');
	document.write('									<td bgcolor="#f5f5dc"><input type=radio value="#f5f5dc" name=tcolor onClick="javascript:ChangeFontColor(\'#f5f5dc\');"></td>');
	document.write('									<td bgcolor="#ffe4c4"><input type=radio value="#ffe4c4" name=tcolor onClick="javascript:ChangeFontColor(\'#ffe4c4\');"></td>');
	document.write('									');
	document.write('									<td bgcolor="#ffebcd"><input type=radio value="#ffebcd" name=tcolor onClick="javascript:ChangeFontColor(\'#ffebcd\');"></td>');
	document.write('									<td bgcolor="#0000ff"><input type=radio value="#0000ff" name=tcolor onClick="javascript:ChangeFontColor(\'#0000ff\');"></td>');
	document.write('									<td bgcolor="#9acd32"><input type=radio value="#9acd32" name=tcolor onClick="javascript:ChangeFontColor(\'#9acd32\');"></td>');
	document.write('									<td bgcolor="#8a2be2"><input type=radio value="#8a2be2" name=tcolor onClick="javascript:ChangeFontColor(\'#8a2be2\');"></td>');
	document.write('									<td bgcolor="#a52a2a"><input type=radio value="#a52a2a" name=tcolor onClick="javascript:ChangeFontColor(\'#a52a2a\');"></td>');
	document.write('									<td bgcolor="#deb887"><input type=radio value="#deb887" name=tcolor onClick="javascript:ChangeFontColor(\'#deb887\');"></td>');
	document.write('									<td bgcolor="#5f9ea0"><input type=radio value="#5f9ea0" name=tcolor onClick="javascript:ChangeFontColor(\'#5f9ea0\');"></td>');
	document.write('									<td bgcolor="#7fff00"><input type=radio value="#7fff00" name=tcolor onClick="javascript:ChangeFontColor(\'#7fff00\');"></td>');
	document.write('									<td bgcolor="#d2691e"><input type=radio value="#d2691e" name=tcolor onClick="javascript:ChangeFontColor(\'#d2691e\');"></td>');
	document.write('									<td bgcolor="#ff7f50"><input type=radio value="#ff7f50" name=tcolor onClick="javascript:ChangeFontColor(\'#ff7f50\');"></td>');
	document.write('									<td bgcolor="#6495ed"><input type=radio value="#6495ed" name=tcolor onClick="javascript:ChangeFontColor(\'#6495ed\');"></td>');
	
	
	document.write('									</TR>');
	
	document.write('									<TR><td bgcolor="#bdb76b"><input type=radio value="#bdb76b" name=tcolor onClick="javascript:ChangeFontColor(\'#bdb76b\');"></td>');
	document.write('										<td bgcolor="#8b008b"><input type=radio value="#8b008b" name=tcolor onClick="javascript:ChangeFontColor(\'#8b008b\');"></td>');
	document.write('										<td bgcolor="#556b2f"><input type=radio value="#556b2f" name=tcolor onClick="javascript:ChangeFontColor(\'#556b2f\');"></td>');
	document.write('										<td bgcolor="#ff8c00"><input type=radio value="#ff8c00" name=tcolor onClick="javascript:ChangeFontColor(\'#ff8c00\');"></td>');
	document.write('										<td bgcolor="#9932cc"><input type=radio value="#9932cc" name=tcolor onClick="javascript:ChangeFontColor(\'#9932cc\');"></td>');
	document.write('										<td bgcolor="#8b0000"><input type=radio value="#8b0000" name=tcolor onClick="javascript:ChangeFontColor(\'#8b0000\');"></td>');
	document.write('										<td bgcolor="#e9967a"><input type=radio value="#e9967a" name=tcolor onClick="javascript:ChangeFontColor(\'#e9967a\');"></td>');
	document.write('										<td bgcolor="#8fbc8f"><input type=radio value="#8fbc8f" name=tcolor onClick="javascript:ChangeFontColor(\'#8fbc8f\');"></td>');
	document.write('										<td bgcolor="#483d8b"><input type=radio value="#483d8b" name=tcolor onClick="javascript:ChangeFontColor(\'#483d8b\');"></td>');
	document.write('										<td bgcolor="#2f4f4f"><input type=radio value="#2f4f4f" name=tcolor onClick="javascript:ChangeFontColor(\'#2f4f4f\');"></td>');
	document.write('										<td bgcolor="#00ced1"><input type=radio value="#00ced1" name=tcolor onClick="javascript:ChangeFontColor(\'#00ced1\');"></td>');
	document.write('										<td bgcolor="#9400d3"><input type=radio value="#9400d3" name=tcolor onClick="javascript:ChangeFontColor(\'#9400d3\');"></td>');
	document.write('										<td bgcolor="#ff1493"><input type=radio value="#ff1493" name=tcolor onClick="javascript:ChangeFontColor(\'#ff1493\');"></td>');
	document.write('										<td bgcolor="#00bfbf"><input type=radio value="#00bfbf" name=tcolor onClick="javascript:ChangeFontColor(\'#00bfbf\');"></td>');
	document.write('										<td bgcolor="#696969"><input type=radio value="#696969" name=tcolor onClick="javascript:ChangeFontColor(\'#696969\');"></td>');
	document.write('										<td bgcolor="#fffaf0"><input type=radio value="#fffaf0" name=tcolor onClick="javascript:ChangeFontColor(\'#fffaf0\');"></td>');
	document.write('										<td bgcolor="#228b22"><input type=radio value="#228b22" name=tcolor onClick="javascript:ChangeFontColor(\'#228b22\');"></td>');
	document.write('										<td bgcolor="#ff00ff"><input type=radio value="#ff00ff" name=tcolor onClick="javascript:ChangeFontColor(\'#ff00ff\');"></td>');
	document.write('										<td bgcolor="#dcdcdc"><input type=radio value="#dcdcdc" name=tcolor onClick="javascript:ChangeFontColor(\'#dcdcdc\');"></td>');
	
	
	document.write('										</TR>');
	document.write('									</table>');
	//Font Color Options Table Ends Here
	document.write('							</td></TR>');
	document.write('							<tr><td height=15px;></td></TR>');

	document.write('							<TR><TD><font size=1 face=arial color="#0274B2"><b>FONT STYLE</b></font> [<a href="javascript:void(0);" onClick="window.open(\'fontstyle.html\', \'pureices\',\'width=500,height=100,scrollbars=0,left=150,top=80\')">Help</a>]</td><TD WIDTH=5%></TD></TR>');
	document.write('							<TR><TD COLSPAN=2>');

	//Font Style Options Table Ends Here
	document.write('		<table border="1" cellpadding="1" cellspacing="2" class=fontstable WIDTH=700 align=center bgcolor=#DBD5D3>');
	document.write('			<TR><TD><input type=radio name=tface value="Arial" onClick="javascript:ChangeFontFace(\'Arial\');" CHECKED><FONT FACE="ARIAL">Arial</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Verdana" onClick="javascript:ChangeFontFace(\'Verdana\');"><FONT FACE="VERDANA">Verdana</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Tahoma" onClick="javascript:ChangeFontFace(\'Tahoma\');"><FONT FACE="TAHOMA">Tahoma</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Cursive" onClick="javascript:ChangeFontFace(\'Cursive\');"><FONT FACE="CURSIVE">Cursive</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Monospace" onClick="javascript:ChangeFontFace(\'Monospace\');"><FONT FACE="Monospace">Monospace</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Courier" onClick="javascript:ChangeFontFace(\'Courier\');"><FONT FACE="COURIER">Courier</FONT></TD>');
	
	document.write('										</TR>');

	document.write('										<TR>');
	
	document.write('										<TD><input type=radio name=tface value="Century Gothic" onClick="javascript:ChangeFontFace(\'Century Gothic\');"><FONT FACE="CENTURY GOTHIC">Century</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Comic Sans MS" onClick="javascript:ChangeFontFace(\'Comic Sans MS\');"><FONT FACE="COMIC SANS MS">Comic sans ms</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Garamond" onClick="javascript:ChangeFontFace(\'Garamond\');"><FONT FACE="GARAMOND">Garamond</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Impact" onClick="javascript:ChangeFontFace(\'Impact\');"><FONT FACE="IMPACT">Impact</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Marigold" onClick="javascript:ChangeFontFace(\'Marigold\');"><FONT FACE="MARIGOLD" size=2>Marigold</FONT></TD>');
	document.write('										<TD><input type=radio name=tface value="Trebechet" onClick="javascript:ChangeFontFace(\'Trebechet MS\');"><FONT FACE="TREBUCHET MS">Trebuchet ms</FONT></TD>');
	document.write('										</TR>');
	document.write('									</table>');
	//Font Style Options Table Ends Here
	document.write('							</td>');
	document.write('							</TR>');
		document.write('					<tr><td height=20px;></td></tr>');
	

	document.write('							<TR><TD><font size=1 face=arial color="#0274B2"><b>FONT SIZE</b></font> [<a href="javascript:void(0);" onClick="window.open(\'fontsize.html\', \'pureices\',\'width=500,height=100,scrollbars=0,left=150,top=80\')">Help</a>]</td><TD WIDTH=5%></Td></TR>');
	document.write('							<TR><TD COLSPAN=2>');

	//Font Size Options Table Ends Here
	document.write('					<table border="1" cellpadding="1" cellspacing="2" class=sizestable WIDTH=700 align=center bgcolor=#DBD5D3>');
	document.write('										');
	document.write('										<TR>');
	document.write('											<TD><FONT SIZE="7">[7]</FONT><BR>Extra Large</TD>');
	document.write('											<TD><FONT SIZE="6">[6]</FONT><BR>Large</TD>');
	document.write('											<TD><FONT SIZE="5">[5]</FONT><BR>Medium</TD>');
	document.write('											<TD><FONT SIZE="3">[3]</FONT><BR>Small</TD>');
	document.write('											<TD><FONT SIZE="2">[2]</FONT><BR>Tiny</TD>');
	document.write('										</TR>');
	
	document.write('										<TR>');
	document.write('											<TD><input type=radio name=tsize value=7 onClick="javascript:ChangeFontSize(\'7\');"></TD>');
	document.write('											<TD><input type=radio name=tsize value=6 onClick="javascript:ChangeFontSize(\'6\');"></TD>');
	document.write('											<TD><input type=radio name=tsize value=5 onClick="javascript:ChangeFontSize(\'5\');"></TD>');
	document.write('											<TD><input type=radio name=tsize value=3 onClick="javascript:ChangeFontSize(\'3\');"></TD>');
	document.write('											<TD><input type=radio name=tsize value=2 onClick="javascript:ChangeFontSize(\'2\');" CHECKED></TD>');
	document.write('										</TR>');
	document.write('										');
	document.write('									');
	document.write('									</table>');
	//Font Size Options Table Ends Here
	document.write('							</td>');
	document.write('							</TR>');

	document.write('						</TABLE>');
	document.write('						<!-- OPTION TABLE ENDS HERE -->');
	document.write('					</td>');
	document.write('					</TR>');
	document.write('				<TR>');
	document.write('					<TD>');

	document.write('							<TABLE WIDTH=500 CELLSPACING=5  ALIGN=CENTER>');
	document.write('							<TR>');
	document.write('								<TD ALIGN=RIGHT><INPUT TYPE="BUTTON" VALUE="Choose Another Card" ONCLICK="location=\'/kwality/ecard.php\';" class=button></TD>');
	document.write('								<TD><INPUT TYPE="BUTTON" NAME="SHOWHIDEBTN" VALUE="HIDE Customize Options" ONCLICK="changeCustomizeOptions();" class=button></TD>');
	document.write('							</TR>');
	document.write('<tr><td></td></tr>');
	document.write('							</TABLE>');
	document.write('					</TD>');
	document.write('				</TR>');
	document.write('			</TABLE>');
	//CUSTOMIZE CARD TABLE ENDS HERE
}
//	document.write('	</td> ');
//	document.write('  </tr> ');
//	document.write('</table> ');
//	document.write('<table width="779"  border="0" align="center" cellpadding="0" cellspacing="0"> ');
//	document.write('  <tr> ');
//	document.write('    <td valign="top">	');
function prestable()
{
	document.write('			<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=left width="575" style="padding-left:200px;" >');
	document.write('				<tr>');
	document.write('					<td>');
	document.write('					<table border=0 cellspacing=1 cellpadding=0 bgcolor=#B3DBFE width="575" align="left">');
	document.write('					<tr>');
	document.write('						<td bgcolor=#B3DBFE height=19 align=center>');
	document.write('							<font color=#D65478 face=Arial size=2><b>Personalize Your eCard</b>');
	document.write('						</td></tr>');
	document.write('					<tr><td valign=top bgcolor=#B3DBFE>');
	document.write('						<table border=0 bordercolor=#FFB010 width=575 cellspacing=2 cellpadding=2 align=center>');
	document.write('						<tr>');
	document.write('							<td width=550 bordercolor=#FFF8CA bgcolor=#FFF8CA colspan=2 valign=top><table><tr><td valign=top><table width=350 cellpdding=0 cellspacing=0><tr><td class=ecardhead1><font color=#814D23>From</font></td></tr><tr><td><b>Name:</b> <input type=text name=sname size=20 maxlength=255></b></td><td><b>Email:</b> <input type=text name=semail size=20></b></td></tr></table></td><td valign=top><table width=230 cellpdding=0 cellspacing=0><tr><td class=ecardhead1><font color=#814D23>Recipients Detail</font></td></tr><tr><td><b>Number of recipients</b>:</td></tr><tr><td> <select name=no_of_recipients onChange="changeMultiple();"><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></select>[ <font style="font-weight: normal;"><i>Send eCard upto 5 people</i>. </font>]&nbsp;&nbsp;&nbsp;</td></tr></table></td></tr></table></td></tr>');
	/*document.write('						<tr>');
	document.write('							<td colspan="2"><b>From:</b></td></tr>');
*/
	//ONKEYUP="window.document.all.FROMDIV.innerHTML=replaceAll(\'<br><br>From - <br>\'+this.value,\'\\n\',\'<br>\'); window.document.all.FROMDIV.visibility=\'visible\'"
	
	
	

	document.write('						<tr>');
	document.write('							<td colspan="2"><b>To:</b></td></tr>');
	document.write('						<tr id=rname1>');
	document.write('							<td valign=top><b>(1) Name:</b> <input type=text name=rname1 size=25 value=""></td>');
	document.write('							<td valign=top><b>Email:</b> <input type=text name=remail1 size=25 value=""></td></tr>');
	document.write('						<tr id=rname2 style=display:none>');
	document.write('							<td valign=top><b>(2) Name:</b> <input type=text name=rname2 size=25 value=""></td>');
	document.write('							<td valign=top><b>Email:</b> <input type=text name=remail2 size=25 value=""></td></tr>');
	document.write('						<tr id=rname3 style=display:none>');
	document.write('							<td valign=top><b>(3) Name:</b> <input type=text name=rname3 size=25 value=""></td>');
	document.write('							<td valign=top><b>Email:</b> <input type=text name=remail3 size=25 value=""></td></tr>');
	document.write('						<tr id=rname4 style=display:none>');
	document.write('							<td valign=top><b>(4) Name:</b> <input type=text name=rname4 size=25 value=""></td>');
	document.write('							<td valign=top><b>Email:</b> <input type=text name=remail4 size=25 value=""></td></tr>');
	document.write('						<tr id=rname5 style=display:none>');
	document.write('							<td valign=top><b>(5) Name:</b> <input type=text name=rname5 size=25 value=""></td>');
	document.write('							<td valign=top><b>Email:</b> <input type=text name=remail5 size=25 value=""></td></tr>');
	
	
	document.write('						</table>');
	document.write('					</td></tr>						');
	document.write('					<tr><td align=center valign=top bgcolor=#CDE7FF>	');
	document.write('						<table border=0 width=400 cellspacing=2 cellpadding=2 bordercolor=#2267c6 align=center>');
	document.write('								<tr><td colspan=2 bgcolor=#FFF8CA  class=ecardhead><b>MESSAGE:</b></td></tr>');
	document.write('								<tr><td WIDTH=400 valign=top>');
	document.write('									<b>Card Header</b> eg: Dear Friend<br>');

//									<!--		<TEXTAREA name=header COLS=40 ROWS=3 ONKEYUP="alert(window.document.TODIV.innerHTML);alert(this.value);window.document.TODIV.innerHTML=replaceAll(this.value,\'\\n\',\'<br>\'); alert(window.document.TODIV.innerHTML);">Dear <recipient name>,</TEXTAREA></td> -->
								a="<recipient name>";
								e="&lt;recipient name&gt;";

	document.write('								<TEXTAREA name=header COLS=40 ROWS=3 	onKeyup="window.document.all.TODIV.innerHTML=replaceAll(this.value,\'\\n\',\'<br>\');" OnBlur="window.document.getElementById(\'TODIV\').innerHTML=replaceAll(this.value,\'\\n\',\'<br>\');"></TEXTAREA></td>');
		
	//replaceAll(this.value.replace(a,e),\'\\n\',\'<br>\');">Dear <recipient name>,</TEXTAREA></td>');

	//ONKEYUP="window.document.all(\"TODIV\").innerText=replaceAll(this.value.replace(a,e),\'\\n\',\'<br>\');">Dear <recipient name>,</TEXTAREA></td>');


	document.write("								<TD><b>Card Footer</b> eg: your's affectionately <br>");

	//document.write('								<TEXTAREA name=footer COLS=40 ROWS=3 	ONKEYUP="changeFooter(this.value);"></TEXTAREA>');	
	
	document.write('								<TEXTAREA name=footer COLS=40 ROWS=3 	ONKEYUP="window.document.getElementById(\'FOOTERDIV\').innerHTML=replaceAll(this.value,\'\\n\',\'<br>\');"></TEXTAREA>');	
	//ONKEYUP="window.document.all(\"FOOTERDIV\").innerText=replaceAll(this.value,\'\\n\',\'<br>\');"></TEXTAREA>');
	
	document.write('								</td></tr>');
								
	document.write('								<tr><td valign=top COLSPAN=2>');
	document.write("									<b>Personal Message</b>&nbsp;eg: Birthday Wishes, Teacher's Day, Friendship Day");
	document.write('								</td></tr>');
	document.write('								<tr><td valign=top COLSPAN=2 align="center">');
	document.write('									<textarea name=message rows=5 cols=80 onKeyup="window.document.getElementById(\'MESSAGEDIV\').innerHTML=replaceAll(this.value,\'\\n\',\'<br>\');" //OnBlur="updateCard();" //onChange="updateCard();" onClick="removeMessage();">Your message will appear here. Write your message in this unlimited space.</textarea>');
	document.write('								</td></tr>');
	document.write('							</table>');
	document.write('						</td></tr>');
	document.write('					</table>');
							
	document.write('					</td></tr>');
	document.write('					<tr><td height=5></td></tr>');
	
	/*document.write('<tr><td><table><tr><td>When do you want to send this ecard?</td> <td><input type="text" name="dates"></td><td><img width=22 height=22 src=images/cal.jpg onclick=popUpCalendar(this,pForm.dates, "yyyy-mm-dd") align=absmiddle></td></tr></table>');*/
	
	
	
	

	document.write('				<TR><TD ALIGN=center>');
	document.write('					<INPUT TYPE=button onClick="window.location=\''+window.location+'#top\'" VALUE="Preview The Card" class=button1> &nbsp;<INPUT TYPE=hidden name="sendToday"><INPUT TYPE=button VALUE="Send Now"  onClick="sendNow();" class=button1></TD></TR>');
	
	document.write('<tr><td>&nbsp;</td></tr>');
	
	
//					<SCRIPT LANGUAGE="JavaScript">
//					<!--
//						showDeliveryDates();
						//showDeliveryDates();
					//-->
//					




	
	document.write('			</TABLE>');
	document.write('				<!-- FORM TABLE ENDS HERE -->');
			
			//window.onLoad=updateCard();
			window.document.pForm.message.select();
}

/*function changeFooter(footerval)
{
	window.document.getElementById('FOOTERDIV').innerHTML=replaceAll(footerval.replace(/(,)?/,",\n"),'\n','<br>');
}*/

function removeMessage(){
	if (!_bHasRemoved){
		window.document.pForm.message.value="";

		window.document.getElementById('MESSAGEDIV').innerHTML="";
		_bHasRemoved=!_bHasRemoved;
	}
	
}

function changeMultiple(){
var no_of_recipients = window.document.pForm.no_of_recipients.options[window.document.pForm.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<=5;j++){
		window.document.getElementById("rname"+j).style.display="none";
		//eval("document.pForm.rname"+i+".value='';");
		//eval("document.pForm.remail"+i+".value='';");
	}
}

function changeCustomizeOptions(btn){
	if (window.document.getElementById('OPTIONSPART').style.display!='block'){
		window.document.getElementById('OPTIONSPART').style.display='block';
		window.document.pForm.SHOWHIDEBTN[0].value="Hide Customize Options";
		window.document.pForm.SHOWHIDEBTN[1].value="Hide Customize Options";
	}else{
		window.document.getElementById('OPTIONSPART').style.display='none';
		window.document.pForm.SHOWHIDEBTN[0].value="Show Customize Options";
		window.document.pForm.SHOWHIDEBTN[1].value="Show Customize Options";
//		window.document.getElementById('OPTIONSPART').
	}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ChangeBG(img){
//	window.document.getElementById('td1').background = img;
document.getElementById("td1").setAttribute("background",img);

}
function ChangeFontColor(clr){
	window.document.getElementById('MESSAGEDIV').style.color=clr;
	window.document.getElementById('TODIV').style.color=clr;
	window.document.getElementById('FROMDIV').style.color=clr;
	window.document.getElementById('FOOTERDIV').style.color=clr;
	window.document.getElementById('PUBLISHERDIV').style.color=clr;


}

function ChangeFontFace(fc)
{
	window.document.getElementById('MESSAGEDIV').style.fontFamily = fc;
	window.document.getElementById('FROMDIV').style.fontFamily = fc;
	window.document.getElementById('TODIV').style.fontFamily = fc;
	window.document.getElementById('FOOTERDIV').style.fontFamily =fc;
	window.document.getElementById('PUBLISHERDIV').style.fontFamily =fc;

}
function ChangeFontSize(sz){
	if(sz == 7){sz="xx-large";} 
	if(sz == 6){sz="x-large";} 
	if(sz == 5){sz="large";} 
	if(sz == 3){sz="medium";} 
	if(sz == 2){sz="x-small";} 
	window.document.getElementById('MESSAGEDIV').style.fontSize= sz;
}

function updateCard(){				///////////// functyion discarded

	//GET AND APPLY THE BACKGROUND COLOR..........................
	for (var i=0;i<window.document.pForm.BG.length;i++){
		if (window.document.pForm.BG[i].checked){
			bg = window.document.pForm.BG[i].value;
			break;
		}
	}
	//GET AND APPLY THE FONT COLOR................................
	for (var i=0;i<window.document.pForm.tcolor.length;i++){
		if (window.document.pForm.tcolor[i].checked){
			clr= window.document.pForm.tcolor[i].value;
			break;
		}
	}
	//GET AND APPLY THE FONT-STYLE................................
	for (var i=0;i<window.document.pForm.tface.length;i++){
		if (window.document.pForm.tface[i].checked){
			fnt= window.document.pForm.tface[i].value;
			break;
		}
	}
	//GET AND APPLY THE FONT-SIZE.................................
	for (var i=0;i<window.document.pForm.tsize.length;i++){
		if (window.document.pForm.tsize[i].checked){
			siz= window.document.pForm.tsize[i].value;
			break;
		}
	}

	ChangeBG(bg);	
	ChangeFontColor(clr);
	ChangeFontFace(fnt);
	ChangeFontSize(siz);

	a="<recipient name>";
	e="&lt;recipient name&gt;";


	window.document.all.TODIV.innerHTML=replaceAll(window.document.pForm.header.value.replace(a,e),'\n','<br>');	//window.document.all("TODIV").innerText=replaceAll(window.document.pForm.header.value.replace(a,e),'\n','<br>');

	//window.document.all.FROMDIV.innerHTML=replaceAll('<br><br>From - <br>' + window.document.pForm.sname.value,'\n','<br>')
	window.document.all.FOOTERDIV.innerHTML=replaceAll(window.document.pForm.footer.value,'\n','<br>')
	window.document.all.MESSAGEDIV.innerHTML=replaceAll(window.document.pForm.message.value,'\n','<BR>');
	
//	window.document.all("FOOTERDIV").innerText=replaceAll(window.document.pForm.footer.value,'\n','<br>')
//	window.document.all("MESSAGEDIV").innerText=replaceAll(window.document.pForm.message.value,'\n','<BR>');
	
	/*
	if (window.document.pForm.no_of_recipients.value==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<=window.document.pForm.no_of_recipients.value; i++){
		document.getElementById("rname"+i).style.display="block";
	}


}




//////////////////////////////////////// Form Validations ///////////////////////////////////////////
function _blkcheckCardForm(frm){
	var theMessage = "You entered incorrectly or forgot to fill in ::\n";
	var noErrors = theMessage;
	var focusval = frm.sname;
	//check for sender name 
		if (trimAll(frm.sname.value).length<=0){
			theMessage+="\nSender name is missing!";
//			alert("Sorry, but sender name is missing!");
//			frm.sname.focus();
//			return(false);
		}
	//check for sender email 
		if (trimAll(frm.semail.value).length<=0){
			theMessage+="\nSender email is missing!";
//			alert("Sorry, but sender email is missing!");
//			frm.semail.focus();
//			return(false);
		}else if (!isValidEmail(trimAll(frm.semail.value))){		//check for sender email validity
			theMessage+="\nSender email is incorrect!";
//			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.rname"+r+".value")).length<=0 ){
				theMessage+="\nRecipient ("+r+") name is missing!";
//				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 ){
				theMessage+="\nRecipient ("+r+") email is missing!";
//				alert("Sorry, but recipient ("+r+") email is missing!");
//				eval("frm.remail"+r+".focus()");
//				return(false);
			}
			else if ( !isValidEmail(trimAll(eval("frm.remail"+r+".value")))){
				theMessage+="\nRecipient ("+r+") email is incorrect!";
//				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;
		} 
		
		//check for card header
		/*if (Number(frm.no_of_recipients.value)==1){
			if (trimAll(frm.header.value).length<=0){
				alert("Sorry, but card header is missing!");
				frm.header.focus();
				return(false);
			}
		}*/
		//check for card footer
			/*if (trimAll(frm.footer.value).length<=0){
				alert("Sorry, but card footer is missing!");
				frm.footer.focus();
				return(false);
			}*/
		//check for card message
			/*if (trimAll(frm.message.value).length<=0){
				alert("Sorry, but card message is missing!");
				frm.message.focus();
				return(false);
			}*/
		
		if(check_unique_emails())
		{
			return(true);
		}
		else
		{
			return false;
		}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//			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;

}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		BANNER REALT
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function showBanner(){
//do changes here for right side banner..........
var bannerimage	= site_path + "/newimages/banners/apr/banner01.jpg";
var width		= 150;
var height		= 400;
var url			= "http://www.theydeserveit.com";

//do not change here ...........................
document.write('<TABLE WIDTH=150 CELLPADDING=0 CELLSPACING=0 ALIGN=CENTER>');
document.write('<TR>');
document.write('	<TD><A HREF="'+url+'" TARGET=_blank><IMG SRC="'+bannerimage+'" ALT="" WIDTH="'+width+'" HEIGHT="'+height+'" BORDER=0></A></TD>');
document.write('</TR>');
document.write('</TABLE>');
}

function check_unique_emails()
{

	frm=document.pForm;

	/*	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;
	}

}

//////////////////////////////////////////

function noRepeatEmail(num)
{
//alert('called repeat')
	var flag=0;
	var all_arrays=new Array();

	for (j=0; j <= num ; j++) 
	{
		
		var obj1 = eval("document.pForm.remail" + j);
		if(obj1)
		{

			//if(!isBlank(obj1.value))
			if (trimAll(obj1.value).length>0)
			{
				emailArr=obj1.value.split(",");
				all_arrays=all_arrays.concat(emailArr);
			}
		}
	}
	
	for (j=0; j < all_arrays.length; j++) 
	{
		var val1 = all_arrays[j];
		for (jj=0; jj < all_arrays.length ; jj++) 
		{
			if(j!=jj)
			{
				var val2 = all_arrays[jj];
				if(val1==val2)
				{
					flag=1;
				}
			}

		} 	 //end for
		
	}

	if (flag==1)
	{
		alert("Please Ensure That You Have Entered All Different Emails.");
		return false;
	}
	else //no Defferent Emails
	{		
		return true;
	}
			
}











