<script type="text/javascript" language="javascript">
    function makeRequest(url)
    {
     // window.alert(url);
        var httpRequest;

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            httpRequest = new XMLHttpRequest();
            if (httpRequest.overrideMimeType) {
                httpRequest.overrideMimeType('text/xml');
                // See note below about this line
            }
        }
        else if (window.ActiveXObject) { // IE
            try {
                httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch (e) {
                try {
                    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e) {}
            }
        }

        if (!httpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
       // window.alert(httpRequest);
        httpRequest.onreadystatechange = function(){ alertContents(httpRequest); };
        httpRequest.open('GET', url, true);
        httpRequest.send('');

    }

    function alertContents(httpRequest)
    {

        if (httpRequest.readyState == 4)
         {
            if (httpRequest.status == 200)
            {
                var strEmail='';
		        var strMonth='';
		        var strDay='';
		        var str = httpRequest.responseText;
				var arrReturnVal=str.split("/");
				//Populate the innerHTML of the div with the results <BR>            
				strEmail=arrReturnVal[0];
				strMonth=arrReturnVal[1];
				strDay=arrReturnVal[2];
				strName=arrReturnVal[3];
				window.document.frm.elements["txtr_email"].value=strEmail;
				window.document.frm.elements["txtRecipientName"].value=strName;
				if(strMonth!='')
				{
					document.frm.lstMonth.selectedIndex=strMonth-1;
				}
				if(strDay!='')
				{
					document.frm.lstDate.selectedIndex=strDay-1;
				}
                //alert(httpRequest.responseText);
            }
         }
            else
             {
                //alert('There was a problem with the request.');
            }
        }


	//==============Create the XMLHTTP Object===================================//

function changeitem(obj)
{
	//window.alert(obj.value);
	if(obj.value!=0)
	{
	   //alert(obj);
		//window.alert(obj.value);
		//-----------Embed the value or reminderid with the requesturl----------//
		//var url = requestURL + obj.value;
		makeRequest('reminderdetail.aspx?reminderid='+obj.value);

	}
	return false;
}

</script>

<SCRIPT language="javascript" type="text/javascript">

function validate() {
if (document.frm.txtRecipientName.value.length < 1) {
alert("Please enter a Recipient Name.");

document.frm.txtRecipientName.focus();
return false;
}
else if (document.frm.txtr_email.value.length < 1) {
alert("Please enter a Recipient email .");

document.frm.txtr_email.focus();
return false;
}
else if (document.frm.txtName.value.length < 1) {
alert("Please enter a your Name.");

document.frm.txtName.focus();
return false;
}
else if (document.frm.txtEmail.value.length < 1) {
alert("Please enter a your email .");

document.frm.txtEmail.focus();
return false;
}
else
{
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.frm.txtr_email.value))
 {
   //return (true)
  }
  else
  {
    alert("Invalid E-mail Address! Please re-enter.");
    document.frm.txtr_email.focus();
    return (false)
  }
 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.frm.txtEmail.value))
 {
   return (true)
  }
  else
  {
    alert("Invalid E-mail Address! Please re-enter.");
    document.frm.txtEmail.focus();
    return (false)
  }
}

return true;
}

</SCRIPT>
<script language="javascript" type="text/javascript">
var xmlhttp;

function ajaxFunction()
{

/*if (window.XMLHttpRequest){
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
alert("Your browser does not support XMLHTTP!");
}

 var url="photoCard.aspx?level1=a";
xmlhttp.open("GET",url,true);
xmlhttp.send(null);

xmlhttp.onreadystatechange=sendRes;*/
  var hdVal=document.getElementById("hdContainer").value;
  if(parseInt(hdVal)==1)
  {
   openPopUp();
  }
  else
  {
     window.location="http://www.happybirthday.com/login.aspx?redirecturl=http://www.happybirthday.com/photocard.aspx";
  }
}
function togglePopUp()
{
popObj=document.getElementById("popUpDiv");
if(popObj.style.display=="block")
{
popObj.style.display="none"
document.getElementById("blanket").style.display="none";
}

}
/*function sendRes()
{
 alert("Hie");
if(xmlhttp.readyState==4)
  {
    if(xmlhttp.responseText=="true")
    {

        openPopUp();
    }
    else
    {

    }
   }
 }*/
function openPopUp()
{
wWindow=(document.all)? document.body.clientWidth:document.documentElement.clientWidth;
hWindow=(document.all)? document.body.clientHeight:document.documentElement.clientHeight;
sTop=(document.all)? document.body.scrollTop:document.documentElement.scrollTop;
popObj=document.getElementById("popUpDiv");
wPoup=popObj.style.width;
hPopup=popObj.style.height;

leftPos=parseInt(parseInt(wWindow)/2)-parseInt(parseInt(wPoup)/2);
topPos=parseInt(sTop)+parseInt(parseInt(hWindow)/2)-parseInt(parseInt(hPopup)/2);
popObj.style.display="block";
popObj.style.position='absolute';
popObj.style.left=leftPos;
popObj.style.top=topPos;
popObj.style.zIndex='100001'
popObj.style.backgroundColor="#E1E1E1"
backObj=document.getElementById("blanket");
backObj.style.display="block";
backObj.style.position='absolute';
backObj.style.opacity="0.60";
backObj.style.zIndex='100000'
backObj.style.backgroundColor="#111111"
backObj.style.filter="alpha(opacity=60)";
backObj.style.width=wWindow;
backObj.style.height=document.body.scrollHeight;
window.scrolling='no';
}
/*
window.onscroll=function scrollMovePopUp(){
popObj=document.getElementById("popUpDiv");
if(popObj.style.display=="block")
{
wWindow=(document.all)? document.body.clientWidth:document.documentElement.clientWidth;
hWindow=(document.all)? document.body.clientHeight:document.documentElement.clientHeight;
sTop=(document.all)? document.body.scrollTop:document.documentElement.scrollTop;
wPoup=popObj.style.width;
hPopup=popObj.offsetHeight;
leftPos=parseInt(parseInt(wWindow)/2)-parseInt(parseInt(wPoup)/2);
topPos=parseInt(sTop)+parseInt(parseInt(hWindow)/2)-parseInt(parseInt(hPopup)/2);
//popObj.style.left=leftPos;
popObj.style.top=topPos;
}

}*/

</script>
<script language="javascript" type="text/javascript">
var rimPath=null;var rjsPath=null;var rPath2Root=null;function InitRelCode(){var iImg;var jImg;var tObj;if(!document.layers){iImg=document.images['dmbif'];jImg=document.images['dmbjs'];tObj=jImg;}else{tObj=document.layers['dmbri'];if(tObj){iImg=tObj.document.images['dmbif'];jImg=tObj.document.images['dmbjs'];}}if(!tObj){window.setTimeout("InitRelCode()",700);return false;}rimPath=_gp(iImg.src);rjsPath=_gp(jImg.src);rPath2Root=rjsPath+"../";return true;}function _purl(u){return xrep(xrep(u,"%%REP%%",rPath2Root),"\\","/");}function _fip(img){if(img.src.indexOf("%%REL%%")!=-1) img.src=rimPath+img.src.split("%%REL%%")[1];return img.src;}function _gp(p){return p.substr(0,p.lastIndexOf("/")+1);}function xrep(s,f,n){if(s) s=s.split(f).join(n);return s;}InitRelCode();
</script>
<script language="javascript" type="text/javascript">
function LoadMenus() {if(!rjsPath){window.setTimeout("LoadMenus()", 10);return false;}var navVer = navigator.appVersion;
if(navVer.substr(0,3) >= 4)
if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) {
document.write('<' + 'script language="javascript" type="text/javascript" src="' + rjsPath + 'nsmenu.js"><\/script\>');
} else {
document.write('<' + 'script language="javascript" type="text/javascript" src="' + rjsPath + 'iemenu.js"><\/script\>');
}return true;}LoadMenus();</script>

<script language="javascript" src="*csspopupB.js"></script>

 <script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script>


