// HEADER GOES HERE
function gnfheader(path)
{
	if (path==null)
	{
		path="./"
	}
	document.write('<table border="0" width="779" align="center" cellpadding="0" cellspacing="0"><tr><td><img src="'+path+'images/inner-head01.jpg" alt="Giftsnflower.com" width="154" height="147"></td><td height="147" align="center" valign="middle"><img src="'+path+'images/inner-head02.jpg" width="242" height="147"></td> <td><img src="'+path+'images/inner-head03.jpg" alt="Giftsnflower.com" width="213" height="147" /></td><td><img src="'+path+'images/inner-head04.jpg" alt="Giftsnflower.com" width="170" height="147" /></td></tr></table>')
	
	document.write('<table width="779" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td width="154" height="16" background="'+path+'images/inner-strip01.jpg"class="colortext">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+path+'index.html" class="colortext">HOME</a> </td>    <td width="600" align="right" bgcolor="#A2CA5A"><span class="blacktxt"><a href="'+path+'aboutus.html" class="blacktxt">About Us</a> | <a href="'+path+'contactus.html" class="blacktxt">Contact Us</a> | <a href="'+path+'recommend-site.html" class="blacktxt">Recommend this Site </a> | <a href="'+path+'wallpapers/index.html" class="blacktxt">Wallpapers</a>| <a href="'+path+'links.html" class="blacktxt">Useful Links </a> | <a href="'+path+'sitemap.html" class="blacktxt">Sitemap</a></td>    <td width="24"><img src="'+path+'images/inner-strip03.jpg" width="25" height="16" /></td>  </tr></table>')
}


// LEFT PANEL GOES HERE
function gnfleftlinks(path)
{
	if (path==null)
	{
		path="./"
	}
	document.write('<table border="0" cellspacing="0" cellpadding="0"> <tr><td><img src="'+path+'images/menu-head.jpg" width="142" height="33"></td> </tr><tr> <td valign="top" background="'+path+'images/menu-stripbg.jpg"><table width="98%" border="0" cellspacing="4" cellpadding="4">')
	
	document.write('<tr><td><a href="'+path+'flowers-gifts.html" class="linkstext">Flowers and Gifts </a></td></tr>')
	document.write('<tr><td> <a href="'+path+'flowers-for-her/" class="linkstext">Flowers to Her</a></td></tr>')
	document.write('<tr><td> <a href="'+path+'flowers-for-him/" class="linkstext">Flowers to Him</a></td></tr>')
	document.write('<tr><td><a href="'+path+'annviersary-flowers/" class="linkstext">Anniversary Flowers</a></td></tr>')
	document.write('<tr><td><a href="'+path+'wedding-flowers/" class="linkstext">Wedding Flowers</a></td></tr>')
	document.write('<tr><td><a href="'+path+'birthday-flowers/" class="linkstext">Birthday Flowers</a></td></tr>')
	document.write('<tr><td><a href="'+path+'love-flowers/" class="linkstext">Love Flowers</a></td></tr>')
	
	//Gifts Section Links goes here

	document.write('<tr><td><a href="'+path+'gifts-for-him/" class="linkstext">Gifts for Him</a></td></tr>')
	document.write('<tr><td><a href="'+path+'birthday-gifts/" class="linkstext">Birthday Gifts</a></td></tr>')
	document.write('<tr><td><a href="'+path+'gifts-for-her/" class="linkstext">Gifts for Her</a></td></tr>')
	//document.write('<tr><td><a href="'+path+'gifts/cakes-cookies/index.html" class="linkstext">Cakes and Cookies</a></td></tr>')
	//document.write('<tr><td><a href="'+path+'gifts/soft-toys/index.html" class="linkstext">Soft Toys</a></td></tr>')

    document.write('</table></td></tr><tr><td><img src="'+path+'images/menu-stripbottom.jpg" width="142" height="3"></td>  </tr></table>')
}


// FOOTER GOES HERE

function gnffooter(path)
{
	if (path==null)
	{
		path="./"
	}
	document.write('<table width="779" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E5E5E5"><tr><td colspan="3" align="center" class="copyright">&copy; Copyright 2005-2006 <a href="http://www.giftsnflower.com" class="copyright">gifts\'n\'flower.com</a>. All Right Reserved.</td></tr></table>')
}


//THIS FUNTION CHECK FOR A VALID  EMAIL ADDRESS.
function isValidEmail(emailid) {
if (emailid == ""){
	return false; // because  it is not optional 
}
else{
		var eid=emailid;

		if (eid.indexOf(' ')!= -1){
			return false ; // no spaces
		} 
		if (eid.length < 6 ){
			return false ; // at least j.a@in
		}
		at=eid.indexOf('@', 0); //check from first position ---- 
		if ( at == -1 || at == 0){ //should not be at first place
			return false ;
		}else{
				var at1=eid.indexOf('@', (at + 1)); //looking for another at one place ahead
				if ( at1 == -1 ) // ie only one at is there
				{
					var dot=eid.indexOf('.',(at + 1));//looking for just next value
					if(dot == (at + 1)|| dot== -1){ //if dot is not there or in the next place
						return false ;	
						}
					else{
						 if ( (dot + 2 ) < eid.length )
							return true ;
						 else{
							return false ;
						}
					}
				}
				else // two @ are there
				{
					return false;
				}
			}	
	return false ;
	}		
}

function checkMe()
{
if (document.rec_frm.txtSender.value==""){
alert("Please Fill the Sender Name!");
rec_frm.txtSender.focus();
return false;
}
if (document.rec_frm.txtSemail.value==""){
alert("Please Fill the Sender Email!");
rec_frm.txtSemail.focus();
return false;
}
if (!isValidEmail(rec_frm.txtSemail.value)) {
	alert("Sender Email is not correct!");
	rec_frm.txtSemail.focus();
	return false;
}
if (document.rec_frm.txtr.value==""){
alert("Please fill the Receipent Name!");
rec_frm.txtr.focus();
return false;
}
if (document.rec_frm.txtremail.value==""){
alert("Please fill the Receipent Email!");
rec_frm.txtremail.focus();
return false;
}
if (!isValidEmail(rec_frm.txtremail.value)) {
	alert("Receipent Email is not correct!");
	rec_frm.txtremail.focus();
	return false;
}
if (document.rec_frm.txtQuery.value==""){
alert("Please fill the Message!");
rec_frm.txtQuery.focus();
return false;
}
else{
return true;
}
}
//-->