function emailcontactpage_actionPerformed(){
var callme="";
if(ge("chk2").checked){
callme="Yes, contact me by phone about special artist offerings, or if you have "+
"problems with my contact information. The best time to call me is in the "+
standardTimes[ge("selectStandardTime").selectedIndex]+".";
}
else{
callme="No, please do not contact me by phone about special artist offerings, or "
"if you have problems with my contact information.";
}
if(emailMessage.indexOf("Dear Jane")==-1||emailMessage.indexOf("Contact")!=-1){
emailMessage = "";
}
emailMessage += " Contact Information \n"+
"---------------------------------------\n"+
ge("cname").value+"\n"+ge("address").value+"\n"+
ge("city").value+", "+states[ge("selectState").selectedIndex]+" "+
ge("zip").value+"\n\n";
if(callme.indexOf("Yes")!=-1){
emailMessage += phoneTypes[ge("selectPhoneType").selectedIndex]+": "+
ge("phone").value;
}
emailMessage+="\n\n * "+callme+"\n\n";
showFloatingPage("questionaire");
}
function emailcontactpage_toggleCall(){
var call = ge("chk2").checked;
ge("selectStandardTime").disabled = call?false:true;
}
function emailcontactpage_toggleProfile(){
var t = ge("chk1").checked;
ge("cname").value=(t?profile.name:"");
ge("phone").value=(t?profile.phone:"");
ge("selectPhoneType").selectedIndex=(t?profile.phoneTypeIndex:0);
ge("address").value=(t?profile.address:"");
ge("email").value=(t?profile.email:"");
ge("city").value=(t?profile.city:"");
ge("selectState").selectedIndex=(t?profile.stateIndex:0);
ge("zip").value=(t?profile.zip:"");
ge("chk2").checked=(profile.call=="yes"?true:false);
ge("selectStandardTime").selectedIndex=(t?profile.timeCallIndex:0);
ge("selectStandardTime").disabled=(profile.call=="yes"?false:true);
}
function emailcontactpage_clearAll(){
ge("cname").value="";
ge("phone").value="";
ge("selectPhoneType").selectedIndex=0;
ge("address").value="";
ge("email").value="";
ge("city").value="";
ge("selectState").selectedIndex=0;
ge("zip").value="";
ge("chk1").checked=false;
ge("chk2").checked=false;
ge("selectStandardTime").selectedIndex=0;
ge("selectStandardTime").disabled=true;
}
function emailcontactpage_update(){
this.clearAll();
ge("mailList").checked=top.addToList;
}
nch="
Please fill in your contact information...
";
cch="";
container = new Container();
container.paintLayout(PAINT_LAYOUT);
container.setSpacing(CONTAINER_SPACING);
container.setNorthComponent(nch,"top","center");
container.setCenterComponent(cch,"top","center");
var emailContactPage=new Page("Email Contact Setup");
emailContactPage.paintLayout(PAINT_LAYOUT);
emailContactPage.hasGoBack=true;
emailContactPage.createPageHtml(container);
emailContactPage.actionPerformed=emailcontactpage_actionPerformed;
emailContactPage.clearAll=emailcontactpage_clearAll;
emailContactPage.toggleCall=emailcontactpage_toggleCall;
emailContactPage.toggleProfile=emailcontactpage_toggleProfile;
emailContactPage.update=emailcontactpage_update;