winsettings = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,';

function colorwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Colors', 'info', winsettings + 'width=340,height=400') }

function bgroundwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Background', 'info2',  winsettings + 'width=250,height=290') }

function bgroundmsgwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Backgroundmsg', 'info12',  winsettings + 'width=520,height=400') }

function bgrlogomsgwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Backgrlogomsg', 'info13',  winsettings + 'width=250,height=290') }

function emoticonwin(){                cyber=window.open('modules.php?name=Cards&file=win&Info=Emoticons', 'info4', winsettings + 'width=500,height=400') }

function exturl(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Custom', 'info5', winsettings + 'width=450,height=270') }

function notify(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Notify', 'info6', winsettings + 'width=300,height=200') }

function fontface(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Fonts', 'info7', winsettings + 'width=550,height=270') }

function size(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Size', 'info3', winsettings + 'width=550,height=270') }

function stampwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Stamp', 'info8', winsettings + 'width=220,height=390') }

function mycontacts(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Mycontacts', 'info9', winsettings + 'width=550,height=400') }

function myhelp(){                 cyber=window.open('modules.php?name=Cards&file=help&Info=MyHelp', 'info1', winsettings + 'width=550,height=270') }

function mycalendar(){               cyber=window.open('modules.php?name=Cards&file=win&Info=MyCalendar', 'info11', winsettings + 'width=240,height=210') }

function poemwin(){                 cyber=window.open('modules.php?name=Cards&file=win&Info=Poem', 'info10', winsettings + 'width=400,height=390') }

function playmusic(formObj)

{

        musicName = formObj.PostSound.options[formObj.PostSound.selectedIndex].value;

        if(musicName != "modules/Cards/music/")

           window.location= PostSoundURL + musicName;

        else

           alert(MsgWinMusicNote);

}

function ValidateForm() {
        document.eCardform.sendnow.disabled = true;
        return true;
}
function viewpoem(formObj) {
        PoemID = formObj.card_poem.options[formObj.card_poem.selectedIndex].value;
        if (PoemID != "")
        {
                poemwin=window.open(pagehelp +'?topic=poem&poem_id='+PoemID, 'poem', winprop + 'width=550,height=270');
                poemwin.focus();
        } else {
                alert(msg_alert_choose_option);
        }
}
function smilie(text) {
        //text =' '+text+' ';
        if (document.eCardform.PostMessage.createTextRange && document.eCardform.PostMessage.caretPos)
        {
                var caretPos = document.eCardform.PostMessage.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 100)==' '? text+' ':text;
                document.eCardform.PostMessage.focus();
        } else {
                document.eCardform.PostMessage.value += text;
                document.eCardform.PostMessage.focus();
        }
}
function flags(text) {
        //text =' '+text+' ';
        if (document.eCardform.PostMessage.createTextRange && document.eCardform.PostMessage.caretPos)
        {
                var caretPos = document.eCardform.PostMessage.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1)==' '? text+' ':text;
                document.eCardform.PostMessage.focus();
        } else {
                document.eCardform.PostMessage.value += text;
                document.eCardform.PostMessage.focus();
        }
}
function addrecp(formObj){
  NumberRecp = formObj.addrecip.options[formObj.addrecip.selectedIndex].value;
  if(NumberRecp != ""){
    window.location="modules.php?name=Cards&file=create&" + query_string + "&addrecip=" + NumberRecp;
  }
function AddAddress(RecpName, RecpEmail) {
        eval('address = addrecp(document.eCardform.' + Field);
        if (address == null)
                return;
        if (RecpEmail.length == 0)
                return;
        if (address.value.length > 0)
                address.value += ', ';
        if (RecpEmail.indexOf(',') != -1 || RecpEmail.indexOf(';') != -1)
                address.value +=  RecpEmail;
        else
        {
                if (Name.length > 0)
                        address.value += '"' + RecpName + '" ';
                address.value +=  '<' + RecpEmail + '>';
        }
        alert('Contact Added!');
  }

}
