function ObjTmm(){var PDF_FONT_FAMILY="Helvetica";var PDF_FONT_SIZE=10;var CLIENT_FONT_FAMILY="arial";var CLIENT_FONT_SIZE=10;var CLIENT_FONT_WEIGHT="normal";var CLIENT_FONT_STYLE="normal";this["OpenInNewWindow"]=false;this["PageSizeWidth"]="595";this["PageSizeHeight"]="842";this["FileId"]="";this["DeliverCompanyName"]="";this["PageTopMargin"]=50;this["PageBottomMargin"]=50;this["PageLeftMargin"]=50;this["PageRightMargin"]=50;this["ParagraphFlowingWidth"]=0;this["ParagraphFlowingAdjustment"]=1;this["ParagraphAlignment"]="left";this["SmsSend"]=false;this["SmsAppId"]="0";this["SmsTelNo"]="";this["SmsMsg"]="";this["FaxSend"]=false;this["FaxTelNo"]="";this["FaxMsg"]="";this["RecipName"]="";this["RecipAddressLine1"]="";this["RecipAddressLine2"]="";this["RecipTownCity"]="";this["RecipState"]="";this["RecipPostcode"]="";this["RecipCountryCode"]="";this["RecipYourName"]="";this["RecipYourEmail"]="";this["RecipMessage"]="";this["EmailRecipient"]="";this["EmailSubject"]="";this["EmailBody"]="";this["TextLineColor"]="BLACK";var _body=document["getElementsByTagName"]("body")[0];var PostForm=document["createElement"]("form");PostForm["setAttribute"]("id","PostForm");PostForm["setAttribute"]("name","PostForm");PostForm["setAttribute"]("method","post");PostForm["setAttribute"]("action","/render");_body["appendChild"](PostForm);PostForm=document["getElementById"]("PostForm");var TextArea=document["createElement"]("textarea");TextArea["setAttribute"]("id","PDFXmlDocument");TextArea["setAttribute"]("name","PDFXmlDocument");PostForm["appendChild"](TextArea);TextArea=document["getElementById"]("PDFXmlDocument");TextArea["style"]["position"]="absolute";TextArea["style"]["visibility"]="hidden";var InputExecuteType=document["createElement"]("input");InputExecuteType["setAttribute"]("id","ExecuteType");InputExecuteType["setAttribute"]("name","ExecuteType");PostForm["appendChild"](InputExecuteType);InputExecuteType=document["getElementById"]("ExecuteType");InputExecuteType["style"]["position"]="absolute";InputExecuteType["style"]["visibility"]="hidden";if(!CheckObject(false,"SysElementSpan")){var AddParagraph_Span=document["createElement"]("span");AddParagraph_Span["setAttribute"]("id","SysElementSpan");AddParagraph_Span["setAttribute"]("name","SysElementSpan");_body["appendChild"](AddParagraph_Span);} ;AddParagraph_Span=document["getElementById"]("SysElementSpan");var XmlDoc=LoadXMLString("\x3Cdocument\x3E\x3C/document\x3E");CurrentNode=XmlDoc["getElementsByTagName"]("document")[0];NewNode=XmlDoc["createElement"]("settings");CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("document")[0];NewNode=XmlDoc["createElement"]("copyTo");CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("document")[0];NewNode=XmlDoc["createElement"]("advertisement");CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("document")[0];NewNode=XmlDoc["createElement"]("pdfengine");CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("document")[0];NewNode=XmlDoc["createElement"]("email");CurrentNode["appendChild"](NewNode);this["SetUser"]=function (UserId,UserKey){CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("user");NewNode["setAttribute"]("id",UserId);NewNode["setAttribute"]("key",UserKey);CurrentNode["appendChild"](NewNode);} ;this["SetPostBackForm"]=function (PostBackPage,PostBackMessage){CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("postBack");NewNode["setAttribute"]("page",PostBackPage);NewNode["setAttribute"]("message",PostBackMessage);CurrentNode["appendChild"](NewNode);} ;this["SetMailItemPrice"]=function (Price){CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("mailItem");NewNode["setAttribute"]("price",Price);CurrentNode["appendChild"](NewNode);} ;this["SetSessionId"]=function (SessId){CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("session");NewNode["setAttribute"]("id",SessId);CurrentNode["appendChild"](NewNode);} ;this["SetDeliverCompany"]=function (DeliverCompanyName){this["DeliverCompanyName"]=DeliverCompanyName;CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("deliverCompanyName");NewNode["setAttribute"]("id",this.DeliverCompanyName);CurrentNode["appendChild"](NewNode);} ;this["SetFileId"]=function (FileId){this["FileId"]=FileId;CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("userFile");NewNode["setAttribute"]("id",this.FileId);CurrentNode["appendChild"](NewNode);} ;this["CopyTo"]=function (UserId,Folder){CurrentNode=XmlDoc["getElementsByTagName"]("copyTo")[0];NewNode=XmlDoc["createElement"]("userCopyTo");NewNode["setAttribute"]("id",UserId);NewNode["setAttribute"]("folder",Folder);CurrentNode["appendChild"](NewNode);} ;this["AttachAd"]=function (UserId,ReportData){CurrentNode=XmlDoc["getElementsByTagName"]("advertisement")[0];NewNode=XmlDoc["createElement"]("adInfo");NewNode["setAttribute"]("id",UserId);NewNode["setAttribute"]("reportData",ReportData);CurrentNode["appendChild"](NewNode);} ;this["SetEmailRecipient"]=function (EmailAddress){CurrentNode=XmlDoc["getElementsByTagName"]("email")[0];NewNode=XmlDoc["createElement"]("emailAddress");NewNode["appendChild"](XmlDoc["createTextNode"](EmailAddress));CurrentNode["appendChild"](NewNode);} ;this["SetEmailSubject"]=function (EmailSubject){CurrentNode=XmlDoc["getElementsByTagName"]("email")[0];NewNode=XmlDoc["createElement"]("emailSubject");NewNode["appendChild"](XmlDoc["createTextNode"](EmailSubject));CurrentNode["appendChild"](NewNode);} ;this["SetEmailBody"]=function (EmailBody){CurrentNode=XmlDoc["getElementsByTagName"]("email")[0];NewNode=XmlDoc["createElement"]("emailBody");NewNode["appendChild"](XmlDoc["createTextNode"](EmailBody));CurrentNode["appendChild"](NewNode);} ;this["SetEmailAttachFile"]=function (ResourceId){CurrentNode=XmlDoc["getElementsByTagName"]("email")[0];NewNode=XmlDoc["createElement"]("attachment");NewNode["appendChild"](XmlDoc["createTextNode"](ResourceId));CurrentNode["appendChild"](NewNode);} ;this["SetPaperSize"]=function (width,height){this["PageSizeWidth"]=width;this["PageSizeHeight"]=height;CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("pageSize");NewNode["setAttribute"]("w",this.PageSizeWidth);NewNode["setAttribute"]("h",this.PageSizeHeight);CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("defaultFont");NewNode["setAttribute"]("value","Helvetica");CurrentNode["appendChild"](NewNode);} ;this["SetPrintFileName"]=function (PrintFileName){CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("fileDetails");NewNode["setAttribute"]("printFilename",PrintFileName);CurrentNode["appendChild"](NewNode);} ;this["SetPdfFont"]=function (FontFamily,FontSize){PDF_FONT_FAMILY=FontFamily;PDF_FONT_SIZE=parseInt(FontSize);} ;this["SetClientFont"]=function (FontFamily,FontSize,FontWeight,FontStyle){CLIENT_FONT_FAMILY=FontFamily;CLIENT_FONT_SIZE=FontSize;CLIENT_FONT_WEIGHT=FontWeight;CLIENT_FONT_STYLE=FontStyle;} ;this["SetCountryId"]=function (CountryId){NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](CountryId));NewNode["setAttribute"]("name","recip_CountryId_donotprint");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font","0");NewNode["setAttribute"]("fontSize","0");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);} ;this["PrintAddressBlock"]=function (x,y){var Address_Start_X_Value=x;var Address_Start_Y_Value=y;var Address_Font_Family=PDF_FONT_FAMILY;var Address_Font_Size=PDF_FONT_SIZE;CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipName"]+" "));NewNode["setAttribute"]("name","recip_Name");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Address_Font_Family);NewNode["setAttribute"]("fontSize",Address_Font_Size);NewNode["setAttribute"]("x",Address_Start_X_Value);NewNode["setAttribute"]("y",Address_Start_Y_Value);CurrentNode["appendChild"](NewNode);Address_Start_Y_Value+=(Address_Font_Size+2);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipAddressLine1"]+" "));NewNode["setAttribute"]("name","recip_AddressLine1");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Address_Font_Family);NewNode["setAttribute"]("fontSize",Address_Font_Size);NewNode["setAttribute"]("x",Address_Start_X_Value);NewNode["setAttribute"]("y",Address_Start_Y_Value);CurrentNode["appendChild"](NewNode);if(this["RecipAddressLine2"]!=""){Address_Start_Y_Value+=(Address_Font_Size+2);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipAddressLine2"]+" "));NewNode["setAttribute"]("name","recip_AddressLine2");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Address_Font_Family);NewNode["setAttribute"]("fontSize",Address_Font_Size);NewNode["setAttribute"]("x",Address_Start_X_Value);NewNode["setAttribute"]("y",Address_Start_Y_Value);CurrentNode["appendChild"](NewNode);} ;Address_Start_Y_Value+=(Address_Font_Size+2);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipTownCity"]["toUpperCase"]()+" "+this["RecipState"]["toUpperCase"]()+" "+this["RecipPostcode"]+" "));NewNode["setAttribute"]("name","recip_CityStatePostcode_dummy");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Address_Font_Family);NewNode["setAttribute"]("fontSize",Address_Font_Size);NewNode["setAttribute"]("x",Address_Start_X_Value);NewNode["setAttribute"]("y",Address_Start_Y_Value);CurrentNode["appendChild"](NewNode);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipTownCity"]["toUpperCase"]()));NewNode["setAttribute"]("name","recip_TownCity_donotprint");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font","0");NewNode["setAttribute"]("fontSize","0");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipState"]["toUpperCase"]()));NewNode["setAttribute"]("name","recip_State_donotprint");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font","0");NewNode["setAttribute"]("fontSize","0");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this.RecipPostcode));NewNode["setAttribute"]("name","recip_Postcode_donotprint");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font","0");NewNode["setAttribute"]("fontSize","0");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);Address_Start_Y_Value+=(Address_Font_Size+2);NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](this["RecipCountryCode"]+" "));NewNode["setAttribute"]("name","recip_CountryCode");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Address_Font_Family);NewNode["setAttribute"]("fontSize",Address_Font_Size);NewNode["setAttribute"]("x",Address_Start_X_Value);NewNode["setAttribute"]("y",Address_Start_Y_Value);CurrentNode["appendChild"](NewNode);} ;this["AddTextLine"]=function (x,y,str){var TextLine_Start_X_Value=x;var TextLine_Start_Y_Value=y;var TextLine_Font_Family=PDF_FONT_FAMILY;var TextLine_Font_Size=PDF_FONT_SIZE;CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](str+" "));NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",TextLine_Font_Family);NewNode["setAttribute"]("fontSize",TextLine_Font_Size);NewNode["setAttribute"]("color",this.TextLineColor);NewNode["setAttribute"]("x",TextLine_Start_X_Value);NewNode["setAttribute"]("y",TextLine_Start_Y_Value);CurrentNode["appendChild"](NewNode);} ;this["AddTextLinePostcard"]=function (x,y,str){var TextLine_Start_X_Value=x;var TextLine_Start_Y_Value=y;var TextLine_Font_Family=PDF_FONT_FAMILY;var TextLine_Font_Size=PDF_FONT_SIZE;CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](str+" "));NewNode["setAttribute"]("type","text-postcard");NewNode["setAttribute"]("font",TextLine_Font_Family);NewNode["setAttribute"]("fontSize",TextLine_Font_Size);NewNode["setAttribute"]("x",TextLine_Start_X_Value);NewNode["setAttribute"]("y",TextLine_Start_Y_Value);if(str){NewNode["setAttribute"]("w",GetElementWidth(str,CLIENT_FONT_FAMILY,18,CLIENT_FONT_WEIGHT,CLIENT_FONT_STYLE));} else {NewNode["setAttribute"]("w","0");} ;CurrentNode["appendChild"](NewNode);} ;this["AddParagraph"]=function (x,y,str){var ParagraphArray= new Array();var ParagraphArrayIndex=0;var ProcessStr="";var InputStr=str;if(InputStr["indexOf"]("preview_debug")>-1){this["OpenInNewWindow"]=true;InputStr=InputStr["replace"](/preview_debug/g,"");} ;var InputStrArray=InputStr["split"]("\x0A");if(this["ParagraphFlowingWidth"]){ParagraphFlowingWidth=this["ParagraphFlowingWidth"];} else {ParagraphFlowingWidth=((parseInt(this.PageSizeWidth)-parseInt(this.PageRightMargin))*parseInt(this.ParagraphFlowingAdjustment));} ;var print_para_line=false;var space_not_found_count=0;var current_char_index=0;var max_space_count=5;var last_space_found=0;for(i=0;i<InputStrArray["length"];i++){print_para_line=false;space_not_found_count=0;current_char_index=0;last_space_found=0;if(InputStrArray[i]==""){InputStrArray[i]+=" ";} ;for(i2=0;i2<InputStrArray[i]["length"];i2++){ProcessStr+=InputStrArray[i]["charAt"](i2);var width=GetElementWidth(ProcessStr,CLIENT_FONT_FAMILY,CLIENT_FONT_SIZE,CLIENT_FONT_WEIGHT,CLIENT_FONT_STYLE);if(width>ParagraphFlowingWidth){space_not_found_count++;if(space_not_found_count>max_space_count){if(last_space_found>0){ProcessStr=InputStrArray[i]["substring"](current_char_index,last_space_found);i2=last_space_found;} ;print_para_line=true;} else {if(InputStrArray[i]["charAt"](i2)==" "){print_para_line=true;} ;} ;if(print_para_line){ParagraphArray[ParagraphArrayIndex]=ProcessStr;ParagraphArrayIndex++;ProcessStr="";space_not_found_count=0;last_space_found=0;print_para_line=false;current_char_index=(i2+1);} ;} else {if(InputStrArray[i]["charAt"](i2)==" "){last_space_found=i2;} ;} ;} ;if(ProcessStr["length"]>0){ParagraphArray[ParagraphArrayIndex]=ProcessStr;ParagraphArrayIndex++;ProcessStr="";} ;} ;if(window["DOMParser"]){AddParagraph_Span["textContent"]="";} else {AddParagraph_Span["innerText"]="";} ;var Paragraph_Start_X_Value=x;var Paragraph_Start_Y_Value=y;var Paragraph_Font_Family=PDF_FONT_FAMILY;var Paragraph_Font_Size=PDF_FONT_SIZE;CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];for(i=0;i<ParagraphArray["length"];i++){if(Paragraph_Start_Y_Value>(this["PageSizeHeight"]-this["PageBottomMargin"])){this.AddNewPage();Paragraph_Start_Y_Value=this["PageTopMargin"];} ;NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](ParagraphArray[i]));NewNode["setAttribute"]("name","recip_Message");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("font",Paragraph_Font_Family);NewNode["setAttribute"]("fontSize",Paragraph_Font_Size);NewNode["setAttribute"]("x",Paragraph_Start_X_Value);NewNode["setAttribute"]("y",Paragraph_Start_Y_Value);CurrentNode["appendChild"](NewNode);Paragraph_Start_Y_Value+=(parseInt(Paragraph_Font_Size)+2);} ;} ;this["AddImage"]=function (UserId,ImageId,x,y,w,h){CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](ImageId));NewNode["setAttribute"]("type","image");NewNode["setAttribute"]("userId",UserId);NewNode["setAttribute"]("x",x);NewNode["setAttribute"]("y",y);NewNode["setAttribute"]("w",w);NewNode["setAttribute"]("h",h);CurrentNode["appendChild"](NewNode);} ;this["AddPostcardImage"]=function (UserId,ImageId,x,y,w,h){CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](ImageId));NewNode["setAttribute"]("type","image-postcard");NewNode["setAttribute"]("userId",UserId);NewNode["setAttribute"]("x",x);NewNode["setAttribute"]("y",y);NewNode["setAttribute"]("w",w);NewNode["setAttribute"]("h",h);CurrentNode["appendChild"](NewNode);} ;this["AddMagazineImage"]=function (UserId,ImageId,x,y,w,h){CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](ImageId));NewNode["setAttribute"]("type","image-magazine");NewNode["setAttribute"]("userId",UserId);NewNode["setAttribute"]("x",x);NewNode["setAttribute"]("y",y);NewNode["setAttribute"]("w",w);NewNode["setAttribute"]("h",h);CurrentNode["appendChild"](NewNode);} ;this["SendAsEmailInfo"]=function (RecipEmail,SenderName,Subject,Message){NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"](Message+" "));NewNode["setAttribute"]("name","SendAsEmailInfo_donotprint");NewNode["setAttribute"]("type","text");NewNode["setAttribute"]("RecipEmail",RecipEmail+" ");NewNode["setAttribute"]("SenderName",SenderName+" ");NewNode["setAttribute"]("Subject",Subject+" ");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);} ;this["AddNewPage"]=function (){CurrentNode=XmlDoc["getElementsByTagName"]("pdfengine")[0];NewNode=XmlDoc["createElement"]("pdfElement");NewNode["appendChild"](XmlDoc["createTextNode"]("newpage"));NewNode["setAttribute"]("type","newpage");NewNode["setAttribute"]("x","0");NewNode["setAttribute"]("y","0");CurrentNode["appendChild"](NewNode);} ;this["GetXmlDocString"]=function (){var XmlString;if(window["DOMParser"]){XmlString=( new XMLSerializer())["serializeToString"](XmlDoc);} else {XmlString=XmlDoc["xml"];} ;return XmlString;} ;this["Preview"]=function (){InputExecuteType["value"]="Preview";CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("execution");NewNode["setAttribute"]("type","Preview");CurrentNode["appendChild"](NewNode);TextArea["value"]=this.GetXmlDocString();if(this["OpenInNewWindow"]){PostForm["target"]="_blank";} else {PDFRedirectOutput(PostForm);} ;PostForm["submit"]();try{_body["removeChild"](document["getElementById"]("PostForm"));_body["removeChild"](document["getElementById"]("PDFXmlDocument"));_body["removeChild"](document["getElementById"]("ExecuteType"));} catch(err){} ;} ;this["StorePDF"]=function (){InputExecuteType["value"]="StorePDF";CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("execution");NewNode["setAttribute"]("type","StorePDF");CurrentNode["appendChild"](NewNode);CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("sms");NewNode["appendChild"](XmlDoc["createTextNode"](this.SmsMsg));NewNode["setAttribute"]("smsAppId",this.SmsAppId);NewNode["setAttribute"]("smsTelNo",this.SmsTelNo);CurrentNode["appendChild"](NewNode);NewNode=XmlDoc["createElement"]("fax");NewNode["appendChild"](XmlDoc["createTextNode"](this.FaxMsg));NewNode["setAttribute"]("faxTelNo",this.FaxTelNo);CurrentNode["appendChild"](NewNode);TextArea["value"]=this.GetXmlDocString();PDFRedirectOutput(PostForm);PostForm["submit"]();try{_body["removeChild"](document["getElementById"]("PostForm"));_body["removeChild"](document["getElementById"]("PDFXmlDocument"));_body["removeChild"](document["getElementById"]("ExecuteType"));} catch(err){} ;} ;this["SendSms"]=function (SmsAppId,SmsTelNo,SmsMsg){this["SmsSend"]=true;this["SmsAppId"]=SmsAppId;this["SmsTelNo"]=SmsTelNo;this["SmsMsg"]=SmsMsg;} ;this["SendFax"]=function (FaxTelNo,FaxMsg){this["FaxSend"]=true;this["FaxTelNo"]=FaxTelNo;this["FaxMsg"]=FaxMsg;} ;this["SendEmail"]=function (){InputExecuteType["value"]="Email";CurrentNode=XmlDoc["getElementsByTagName"]("settings")[0];NewNode=XmlDoc["createElement"]("execution");NewNode["setAttribute"]("type","SendEmail");CurrentNode["appendChild"](NewNode);alert(this.GetXmlDocString());return ;TextArea["value"]=this.GetXmlDocString();PostForm["submit"]();try{_body["removeChild"](document["getElementById"]("PostForm"));_body["removeChild"](document["getElementById"]("PDFXmlDocument"));_body["removeChild"](document["getElementById"]("ExecuteType"));} catch(err){} ;} ;function PDFRedirectOutput(myForm){if(navigator["appName"]=="Netscape"){h=screen["height"]*0.80;w=screen["width"]*0.90;} else {h=screen["height"]*0.80;w=screen["width"]*0.90;} ;t=(screen["height"]/2)-(h/2);l=(screen["width"]/2)-(w/2);winprops="scrollbars=yes,menubar=no,locationbar=no,toolbar=no,resizable=yes,dependent=yes,alwaysRaised=yes,hotkeys=no,directories=no,status=yes,"+"height="+h+",width="+w+"top="+t+",left="+l;try{win=window["open"]("loading.html","Popup_Window",winprops);} catch(err){} ;myForm["target"]="Popup_Window";} ;function GetElementWidth(InputStr,FontFamily,FontSize,FontWeight,FontStyle){AddParagraph_Span["innerText"]=InputStr;if(window["DOMParser"]){AddParagraph_Span["textContent"]=InputStr;} else {AddParagraph_Span["innerText"]=InputStr;} ;AddParagraph_Span["style"]["fontFamily"]=FontFamily;AddParagraph_Span["style"]["fontSize"]=FontSize+"pt";AddParagraph_Span["style"]["fontWeight"]=FontWeight;AddParagraph_Span["style"]["fontStyle"]=FontStyle;return SysGetElementWidth();} ;function SysGetElementWidth(Elem){Elem="SysElementSpan";if(document["getElementById"]){var elem=document["getElementById"](Elem);} else {if(document["all"]){var elem=document["all"][Elem];} ;} ;if(window["DOMParser"]){xPos=elem["clientWidth"];} else {xPos=elem["offsetWidth"];} ;return xPos;} ;function LoadXMLString(txt){if(window["DOMParser"]){parser= new DOMParser();XmlDoc=parser["parseFromString"](txt,"text/xml");} else {XmlDoc= new ActiveXObject("Microsoft.XMLDOM");XmlDoc["async"]="false";XmlDoc["loadXML"](txt);} ;return XmlDoc;} ;function CheckObject(inParent,theVal){if(inParent){if(window["opener"]["document"]["getElementById"](theVal)!=null){return true;} else {return false;} ;} else {if(document["getElementById"](theVal)!=null){return true;} else {return false;} ;} ;} ;} ;function GetCurrentDate(){var m_names= new Array("01","02","03","04","05","06","07","08","09","10","11","12");var d= new Date();var curr_date=d["getDate"]();var curr_month=d["getMonth"]();var curr_year=d["getFullYear"]();var curr_hour=d["getHours"]();var curr_min=d["getMinutes"]();var curr_sec=d["getSeconds"]();return (curr_year+""+m_names[curr_month]+""+curr_date+""+curr_hour+""+curr_min+""+curr_sec);} ;function RandomString(string_length){var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var randomstring="";for(var i=0;i<string_length;i++){var rnum=Math["floor"](Math["random"]()*chars["length"]);randomstring+=chars["substring"](rnum,rnum+1);} ;return randomstring;} ;function RandomNumber(string_length){var chars="0123456789";var randomstring="";for(var i=0;i<string_length;i++){var rnum=Math["floor"](Math["random"]()*chars["length"]);randomstring+=chars["substring"](rnum,rnum+1);} ;return randomstring;} ;function Magazine(SendIndicator){try{var SystemUserId=document["getElementById"]("SystemUserId")["value"];var UserId=document["getElementById"]("UserId")["value"];if(UserId=""){UserId=0;} ;var RandomNo=RandomNumber(4);if(document["getElementById"]("MagazineDeliveryType")["value"]!="email"){var CountryVal=document["getElementById"]("RecipCountryCode")["value"];var CountryArr=CountryVal["split"](",");var CountryCode=CountryArr[1];var CountryLiteral=CountryArr[2]["replace"](/_/g," ");var PrintFile="TMM-magazine-"+CountryCode+"-"+RandomNo+"-cl";} else {var PrintFile="TMM-magazine-"+"email"+"-"+RandomNo+"-cl";} ;o_obj= new ObjTmm();o_obj.SetUser(UserId,"user_key");o_obj.SetDeliverCompany(document["getElementById"]("DeliverCompanyName")["value"]);try{o_obj.SetSessionId(document["getElementById"]("sid")["value"]);} catch(err){} ;o_obj.SetPaperSize(612,792);if(document["getElementById"]("MagazineDeliveryType")["value"]!="email"){o_obj.AddImage(UserId,"sys_magazineme_logo",30,20,0,0);o_obj.SetPdfFont("Courier",6);o_obj.AddTextLine(400,770,"File Id: "+PrintFile+"-"+GetCurrentDate());try{o_obj["RecipName"]=document["getElementById"]("RecipName")["value"];o_obj["RecipAddressLine1"]=document["getElementById"]("RecipAddressLine1")["value"];o_obj["RecipAddressLine2"]=document["getElementById"]("RecipAddressLine2")["value"];o_obj["RecipTownCity"]=document["getElementById"]("RecipTownCity")["value"];o_obj["RecipState"]=document["getElementById"]("RecipState")["value"];o_obj["RecipPostcode"]=document["getElementById"]("RecipPostcode")["value"];o_obj["RecipCountryCode"]=CountryLiteral;o_obj["RecipYourName"]=document["getElementById"]("RecipYourName")["value"];o_obj["RecipYourEmail"]=document["getElementById"]("RecipYourEmail")["value"];o_obj["RecipMessage"]=document["getElementById"]("RecipMessage")["value"];o_obj.SetPdfFont("Courier","10");o_obj.PrintAddressBlock(70,170);} catch(err){} ;o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(20,770,"Sent by: "+o_obj["RecipYourName"]+"    Email: "+o_obj["RecipYourEmail"]);o_obj["ParagraphFlowingWidth"]=600;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(60,340,o_obj.RecipMessage);o_obj.AddNewPage();} else {var SendAsEmail_Recip=document["getElementById"]("RecipEmail")["value"];var SendAsEmail_Sender=document["getElementById"]("RecipYourName")["value"];var SendAsEmail_Subject=SendAsEmail_Sender;var SendAsEmail_Message=document["getElementById"]("RecipMessage")["value"];o_obj.SendAsEmailInfo(SendAsEmail_Recip,SendAsEmail_Sender,SendAsEmail_Subject,SendAsEmail_Message["replace"](/'/g,"\x26#39;"));} ;try{var ImageIdStr=document["getElementById"]("MagazineImageId")["value"];var ImageIdStrArr=ImageIdStr["split"](";");var ImageId=ImageIdStrArr[1];if(ImageId){o_obj.AddMagazineImage(UserId,ImageId,0,0,612,792);} ;} catch(err){} ;var MagazineCoverName=document["getElementById"]("MagazineCoverId")["value"];o_obj.AddImage(UserId,MagazineCoverName,0,0,0,0);o_obj.SetPrintFileName(PrintFile+".pdf");var DefaultLetterPaidPrice=document["getElementById"]("MailItemPrice")["value"];if(SendIndicator){if(document["getElementById"]("MagazineDeliveryType")["value"]=="email"){o_obj.CopyTo(SystemUserId,"home");o_obj.SetPostBackForm("send_magazine_email","Message");} else {o_obj.CopyTo(SystemUserId,"pdfs");o_obj.SetPostBackForm("send_magazine","Message");} ;o_obj.SetMailItemPrice(DefaultLetterPaidPrice);o_obj.StorePDF();} else {o_obj.Preview();} ;} catch(err){document["write"]("Error - Could not create document - "+err["description"]);} ;} ;function Letter(SendIndicator){try{var SystemUserId=document["getElementById"]("SystemUserId")["value"];var UserId=document["getElementById"]("UserId")["value"];var LetterInBraille=false;var CountryVal=document["getElementById"]("RecipCountryCode")["value"];var CountryArr=CountryVal["split"](",");var CountryCode=CountryArr[1];var CountryLiteral=CountryArr[2]["replace"](/_/g," ");var RandomNo=RandomNumber(4);var PrintInColor=false;try{if(document["getElementById"]("PrintInFullColor")["checked"]){PrintInColor=true;} ;} catch(err){} ;try{if(document["getElementById"]("LetterInBraille")["checked"]){LetterInBraille=true;document["getElementById"]("DeliverCompanyName")["value"]="LM";} ;} catch(err){} ;var PrintFile="TMM-letter-"+CountryCode+"-"+RandomNo+"-bw";if(PrintInColor){PrintFile="TMM-letter-"+CountryCode+"-"+RandomNo+"-cl";} ;if(LetterInBraille){PrintFile="TMM-braille-"+CountryCode+"-"+RandomNo;} ;o_obj= new ObjTmm();o_obj.SetUser(UserId,"user_key");o_obj.SetDeliverCompany(document["getElementById"]("DeliverCompanyName")["value"]);try{o_obj.SetSessionId(document["getElementById"]("sid")["value"]);} catch(err){} ;var FileData=document["getElementById"]("LetterAttachDocId")["value"];var FileDataArr=FileData["split"](";");var AttachFileId=FileDataArr[0];var AttachPageCount=FileDataArr[1];var AttachFileName=FileDataArr[2];o_obj.SetFileId(AttachFileId);if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPaperSize(595,842);} else {if(o_obj["DeliverCompanyName"]=="LM"){o_obj.SetPaperSize(595,842);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPaperSize(612,792);if(parseInt(o_obj.FileId)>0){if(!SendIndicator){o_obj.AddImage(UserId,"sys_attachdoc_guide",1,1,0,0);o_obj.SetPdfFont("Helvetica-Bold",12);o_obj.AddTextLine(60,153,"ADDRESS BLOCK AREA:");o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(60,235,"You are attaching document: "+AttachFileName+" (Id: "+o_obj["FileId"]+") ");o_obj.AddTextLine(60,250,"Number of pages in the document: "+AttachPageCount);o_obj.SetPdfFont("Helvetica-Bold",16);o_obj.AddTextLine(40,290,"Instructions and Notes");o_obj.SetPdfFont("Helvetica",10);o_obj.AddTextLine(40,308,"1. The ADDRESS BLOCK AREA will be overlayed in the attached document.");o_obj.AddTextLine(40,324,"2. Make sure this area is clear OR include a blank page as the 1st page of the attached document.");o_obj.AddTextLine(40,340,"3. Attached documents will be resized to LETTER Paper Size (8.5in x 11in) and printed in B/W");o_obj.AddTextLine(40,356,"4. Your message is omitted when sending an attached document");o_obj.SetPdfFont("Helvetica-Bold",8);o_obj.AddTextLine(40,380,"More Info");o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(40,390,"Read the Article \x27Using your own Logo and Attaching a Document\x27 under Blogs for more ");o_obj.AddTextLine(40,400,"information on how to include a blank page as the 1st page of the attached document. ");o_obj.AddTextLine(40,414,"Click this link to access the article: http://www.themailmonster.com/blog.jsp?blogid=2066056");} else {o_obj.SetPdfFont("Helvetica-Bold",12);o_obj.AddTextLine(60,153,"Attached document printed and posted to:");o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(60,235,"Name of document: "+AttachFileName+" (Id: "+o_obj["FileId"]+") ");o_obj.AddTextLine(60,250,"Number of pages in the document: "+AttachPageCount);} ;} ;} ;} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){var FreeLetter=true;try{var ImageId=document["getElementById"]("ThemedImageId")["value"];if(ImageId){var ImageIdStr=document["getElementById"]("ThemedImageId")["value"];var ImageIdStrArr=ImageIdStr["split"](",");o_obj.AddImage(ImageIdStrArr[0],ImageIdStrArr[1],370,100,0,0);} ;PrintFile="TMM-themed-"+CountryCode+"-"+RandomNo+"-cl";FreeLetter=false;} catch(err){FreeLetter=true;} ;if(parseInt(document["getElementById"]("MailItemPrice")["value"])>0){FreeLetter=false;} ;} ;var LetterLogoId=document["getElementById"]("LetterLogoImageId")["value"];if(o_obj["DeliverCompanyName"]=="TMM"){if(FreeLetter){if(LetterLogoId=="sys_tmm_letter_logo"){if(PrintInColor){LetterLogoId="sys_tmm_letter_logo";} else {LetterLogoId="sys_tmm_letter_logo_bw";} ;o_obj.AddImage(UserId,LetterLogoId,30,30,0,0);o_obj.SetPdfFont("Helvetica-Bold",20);o_obj.AddTextLine(80,58,"theMailMonster.com");o_obj.SetPdfFont("Helvetica",15);o_obj.AddTextLine(80,72,"mailing solutions made easy");} else {o_obj.AddImage(UserId,LetterLogoId,10,10,0,0);} ;} else {o_obj.SetPdfFont("Helvetica-Bold",10);o_obj.AddTextLine(20,830,"theMailMonster.com - mailing solutions made easy");} ;} else {if(o_obj["DeliverCompanyName"]=="LM"){if(LetterLogoId=="sys_tmm_letter_logo"){o_obj.AddImage(UserId,LetterLogoId,30,30,0,0);o_obj.SetPdfFont("Helvetica-Bold",28);o_obj.AddTextLine(330,64,"[ Braille Letter ]");} else {o_obj.AddImage(UserId,LetterLogoId,10,10,0,0);} ;} else {if(o_obj["DeliverCompanyName"]=="PM"){if(parseInt(o_obj.FileId)==0){if(LetterLogoId=="sys_tmm_letter_logo"){if(PrintInColor){LetterLogoId="sys_tmm_letter_logo";} else {LetterLogoId="sys_tmm_letter_logo_bw";} ;o_obj.AddImage(UserId,LetterLogoId,30,30,0,0);} else {o_obj.AddImage(UserId,LetterLogoId,10,10,0,0);} ;} ;} ;} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){if(FreeLetter){try{var DummyText=document["getElementById"]("SponsoredTextId1")["value"];var SponsoredTextId="";var SponsoredText="";var ReportData="- ";ReportData+=" "+document["getElementById"]("RecipTownCity")["value"];ReportData+=" "+document["getElementById"]("RecipState")["value"];ReportData+=" "+document["getElementById"]("RecipPostcode")["value"];ReportData+=" "+CountryLiteral;o_obj.SetPdfFont("Courier","8");o_obj.AddTextLine(20,730,"Sponsored Text:");o_obj.AddTextLine(30,742,"-"+document["getElementById"]("SponsoredText1")["value"]);o_obj.AttachAd(document["getElementById"]("SponsoredTextId1")["value"],ReportData);o_obj.AddTextLine(30,754,"-"+document["getElementById"]("SponsoredText2")["value"]);o_obj.AttachAd(document["getElementById"]("SponsoredTextId2")["value"],ReportData);o_obj.AddTextLine(30,766,"-"+document["getElementById"]("SponsoredText3")["value"]);o_obj.AttachAd(document["getElementById"]("SponsoredTextId3")["value"],ReportData);o_obj.AddTextLine(30,778,"-"+document["getElementById"]("SponsoredText4")["value"]);o_obj.AttachAd(document["getElementById"]("SponsoredTextId4")["value"],ReportData);o_obj.AddTextLine(30,790,"-"+document["getElementById"]("SponsoredText5")["value"]);o_obj.AttachAd(document["getElementById"]("SponsoredTextId5")["value"],ReportData);} catch(err){} ;} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Courier",6);o_obj.AddTextLine(410,830,"File Id: "+PrintFile+"-"+GetCurrentDate());} else {if(o_obj["DeliverCompanyName"]=="LM"){o_obj.SetPdfFont("Courier",6);o_obj.AddTextLine(410,830,"File Id: "+PrintFile+"-"+GetCurrentDate());} else {if(o_obj["DeliverCompanyName"]=="PM"){if(parseInt(o_obj.FileId)==0){o_obj.SetPdfFont("Courier",6);o_obj.AddTextLine(400,770,"File Id: "+PrintFile+"-"+GetCurrentDate());} ;} ;} ;} ;try{o_obj["RecipName"]=document["getElementById"]("RecipName")["value"];o_obj["RecipAddressLine1"]=document["getElementById"]("RecipAddressLine1")["value"];o_obj["RecipAddressLine2"]=document["getElementById"]("RecipAddressLine2")["value"];o_obj["RecipTownCity"]=document["getElementById"]("RecipTownCity")["value"];o_obj["RecipState"]=document["getElementById"]("RecipState")["value"];o_obj["RecipPostcode"]=document["getElementById"]("RecipPostcode")["value"];o_obj["RecipCountryCode"]=CountryLiteral;o_obj["RecipYourName"]=document["getElementById"]("RecipYourName")["value"];o_obj["RecipYourEmail"]=document["getElementById"]("RecipYourEmail")["value"];o_obj["RecipMessage"]=document["getElementById"]("RecipMessage")["value"];if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Courier","10");o_obj.PrintAddressBlock(100,178);} else {if(o_obj["DeliverCompanyName"]=="LM"){o_obj.SetPdfFont("Courier","10");o_obj.PrintAddressBlock(100,750);o_ctnry= new ObjCountriesExtDelivery();var CountryArr=o_ctnry.CheckCountry(CountryCode);if(CountryArr!=""){o_obj.SetCountryId(CountryArr["split"](";")[3]);} ;} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPdfFont("Courier","10");o_obj.PrintAddressBlock(70,170);} ;} ;} ;} catch(err){} ;if(o_obj["DeliverCompanyName"]=="TMM"){if(FreeLetter){o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(20,710,"Sent by: "+o_obj["RecipYourName"]+"    Email: "+o_obj["RecipYourEmail"]);} else {o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(20,810,"Sent by: "+o_obj["RecipYourName"]+"    Email: "+o_obj["RecipYourEmail"]);} ;} else {if(o_obj["DeliverCompanyName"]=="LM"){o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(20,720,"Delivery Address:");} else {if(o_obj["DeliverCompanyName"]=="PM"){if(parseInt(o_obj.FileId)==0){o_obj.SetPdfFont("Helvetica",8);o_obj.AddTextLine(20,770,"Sent by: "+o_obj["RecipYourName"]+"    Email: "+o_obj["RecipYourEmail"]);} ;} ;} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){if(FreeLetter){o_obj["PageBottomMargin"]=150;} ;o_obj["ParagraphFlowingWidth"]=600;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(60,340,o_obj.RecipMessage);} else {if(o_obj["DeliverCompanyName"]=="LM"){o_obj["RecipMessage"]=o_obj["RecipMessage"]+"\x0A\x0ASent by: "+o_obj["RecipYourName"]+"    Email: "+o_obj["RecipYourEmail"];o_obj["ParagraphFlowingWidth"]=550;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(75,120,o_obj.RecipMessage);} else {if(o_obj["DeliverCompanyName"]=="PM"){if(parseInt(o_obj.FileId)==0){o_obj["ParagraphFlowingWidth"]=600;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(60,340,o_obj.RecipMessage);} ;} ;} ;} ;o_obj.SetPrintFileName(PrintFile+".pdf");var DefaultLetterPaidPrice=document["getElementById"]("MailItemPrice")["value"];if(SendIndicator){o_obj.CopyTo(SystemUserId,"pdfs");o_obj.SetMailItemPrice(DefaultLetterPaidPrice);o_obj.SetPostBackForm("mailitemsent.jsp","Message");o_obj.StorePDF();} else {o_obj.Preview();} ;} catch(err){document["write"]("Error - Could not create document - "+err["description"]);} ;} ;function Postcard(SendIndicator){try{var SystemUserId=document["getElementById"]("SystemUserId")["value"];var UserId=document["getElementById"]("UserId")["value"];var CountryVal=document["getElementById"]("RecipCountryCode")["value"];var CountryArr=CountryVal["split"](",");var CountryCode=CountryArr[1];var CountryLiteral=CountryArr[2]["replace"](/_/g," ");var RandomNo=RandomNumber(4);var PrintFile="TMM-postcard-"+CountryCode+"-"+RandomNo+"-cl";o_obj= new ObjTmm();o_obj.SetUser(UserId,"user_key");o_obj.SetDeliverCompany(document["getElementById"]("DeliverCompanyName")["value"]);try{o_obj.SetSessionId(document["getElementById"]("sid")["value"]);} catch(err){} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPaperSize(422,297);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPaperSize(450,324);} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj=Postcard1stPage(o_obj,CountryLiteral);o_obj.AddNewPage();o_obj=Postcard2ndPage(o_obj,CountryLiteral);} else {if(o_obj["DeliverCompanyName"]=="PM"){if(SendIndicator){o_obj=Postcard2ndPage(o_obj,CountryLiteral);o_obj.AddNewPage();o_obj=Postcard1stPage(o_obj,CountryLiteral);} else {o_obj=Postcard1stPage(o_obj,CountryLiteral);o_obj.AddNewPage();o_obj=Postcard2ndPage(o_obj,CountryLiteral);} ;} ;} ;o_obj.SetPrintFileName(PrintFile+".pdf");var DefaultPostcardUsAuPrice=175;var DefaultPostcardOthPrice=400;var DefaultPostcardUsPrice=document["getElementById"]("MailItemPrice")["value"];if(SendIndicator){o_obj.CopyTo(SystemUserId,"pdfs");o_obj.SetMailItemPrice(DefaultPostcardUsPrice);o_obj.SetPostBackForm("mailitemsent.jsp","Message");o_obj.StorePDF();} else {o_obj.Preview();} ;} catch(err){document["write"]("Error - Could not create document - "+err["description"]);} ;} ;function Postcard1stPage(o_obj,CountryLiteral){if(o_obj["DeliverCompanyName"]=="TMM"){try{var ImageIdStr=document["getElementById"](";")["value"];var ImageIdStrArr=ImageIdStr["split"](",");var ImageId=ImageIdStrArr[1];if(ImageId){o_obj.AddPostcardImage(UserId,ImageId,5,5,390,230);} ;o_obj.SetPdfFont("Helvetica-Bold",18);o_obj.AddTextLinePostcard(60,275,document["getElementById"]("PostcardCaption")["value"]);} catch(err){} ;} else {if(o_obj["DeliverCompanyName"]=="PM"){try{var ImageIdStr=document["getElementById"]("PostcardImageId")["value"];var ImageIdStrArr=ImageIdStr["split"](";");var ImageId=ImageIdStrArr[1];if(ImageId){o_obj.AddPostcardImage(UserId,ImageId,10,10,430,304);} ;o_obj.SetPdfFont("Helvetica-Bold",18);o_obj.AddTextLinePostcard(60,295,document["getElementById"]("PostcardCaption")["value"]);} catch(err){} ;} ;} ;return o_obj;} ;function Postcard2ndPage(o_obj,CountryLiteral){if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.AddImage(SystemUserId,"sys_postcard_postagepaid",350,20,0,0);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.AddImage(SystemUserId,"sys_postcard_postagepaid",375,20,0,0);} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Helvetica-Bold",8);o_obj.AddTextLine(320,280,"theMailMonster.com");} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPdfFont("Helvetica-Bold",8);o_obj.AddTextLine(30,262,"Postcard from www.theMailMonster.com");} ;} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Helvetica",10);o_obj.AddTextLine(30,20,"Sent by: "+document["getElementById"]("RecipYourName")["value"]);o_obj.AddTextLine(30,32,"Email: "+document["getElementById"]("RecipYourEmail")["value"]);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPdfFont("Helvetica",10);o_obj.AddTextLine(30,240,"Sent by: "+document["getElementById"]("RecipYourName")["value"]);o_obj.AddTextLine(30,252,"Email: "+document["getElementById"]("RecipYourEmail")["value"]);} ;} ;try{o_obj["RecipName"]=document["getElementById"]("RecipName")["value"];o_obj["RecipAddressLine1"]=document["getElementById"]("RecipAddressLine1")["value"];o_obj["RecipAddressLine2"]=document["getElementById"]("RecipAddressLine2")["value"];o_obj["RecipTownCity"]=document["getElementById"]("RecipTownCity")["value"];o_obj["RecipState"]=document["getElementById"]("RecipState")["value"];o_obj["RecipPostcode"]=document["getElementById"]("RecipPostcode")["value"];o_obj["RecipCountryCode"]=CountryLiteral;o_obj["RecipYourName"]=document["getElementById"]("RecipYourName")["value"];o_obj["RecipYourEmail"]=document["getElementById"]("RecipYourEmail")["value"];o_obj["RecipMessage"]=document["getElementById"]("RecipMessage")["value"];if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Helvetica-Bold",10);o_obj.AddTextLine(260,110,"Delivery Address");o_obj.SetPdfFont("Helvetica",10);o_obj.PrintAddressBlock(260,130);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPdfFont("Helvetica-Bold",10);o_obj.AddTextLine(265,170,"Delivery Address");o_obj.SetPdfFont("Helvetica",10);o_obj.PrintAddressBlock(265,190);} ;} ;} catch(err){} ;if(o_obj["DeliverCompanyName"]=="TMM"){o_obj.SetPdfFont("Helvetica-Oblique",10);o_obj.AddTextLine(30,110,"Message");o_obj["ParagraphFlowingWidth"]=220;o_obj["PageBottomMargin"]=5;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(30,130,o_obj.RecipMessage);} else {if(o_obj["DeliverCompanyName"]=="PM"){o_obj.SetPdfFont("Helvetica-Oblique",10);o_obj.AddTextLine(30,30,"Message");o_obj["ParagraphFlowingWidth"]=220;o_obj["PageBottomMargin"]=5;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(30,50,o_obj.RecipMessage);} ;} ;return o_obj;} ;function Sms(SendIndicator){try{var SystemUserId=document["getElementById"]("SystemUserId")["value"];var UserId=document["getElementById"]("UserId")["value"];var SmsTelNo=document["getElementById"]("SmsTelNo")["value"];var SmsMsg=document["getElementById"]("SmsMsg")["value"];var CountryData=document["getElementById"]("SmsCountry")["value"];var CountryDataArr=CountryData["split"](";");var CountryCode=CountryDataArr[0];var SmsAppId=CountryDataArr[1];var PrintFile="TMM-sms-"+SmsTelNo+"";o_obj= new ObjTmm();o_obj.SetUser(UserId,"user_key");o_obj.SetPaperSize(400,100);try{o_obj.SetSessionId(document["getElementById"]("sid")["value"]);} catch(err){} ;o_obj.SetDeliverCompany("CLICKATELL");var FreeSms=true;if(parseInt(document["getElementById"]("MailItemPrice")["value"])>0){FreeSms=false;} ;var SponsoredText="";if(FreeSms){try{var ReportData="- ";ReportData+=SmsTelNo["substring"](0,5)+"*********";SponsoredText=" - "+document["getElementById"]("SponsoredText1")["value"];o_obj.AttachAd(document["getElementById"]("SponsoredTextId1")["value"],ReportData);} catch(err){SponsoredText=" - FreeSms from www.theMailMonster.com";} ;} ;o_obj.SetPdfFont("Courier",10);o_obj.AddTextLine(10,15,"Mobile No:"+SmsTelNo);o_obj["ParagraphFlowingWidth"]=350;o_obj["PageBottomMargin"]=5;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(10,30,SmsMsg+SponsoredText);o_obj.SetPrintFileName(PrintFile+".pdf");var DefaultSmsPaidPrice=document["getElementById"]("MailItemPrice")["value"];if(SendIndicator){o_obj.CopyTo(SystemUserId,"sms");o_obj.SetMailItemPrice(DefaultSmsPaidPrice);o_obj.SendSms(SmsAppId,SmsTelNo,SmsMsg["replace"](/'/g,"\x26#39;")+SponsoredText["replace"](/'/g,"\x26#39;"));o_obj.SetPostBackForm("send_sms",SmsMsg);o_obj.StorePDF();} else {o_obj.Preview();} ;} catch(err){document["write"]("Error - Could not create document - "+err["description"]);} ;} ;function Fax(SendIndicator){try{var SystemUserId=document["getElementById"]("SystemUserId")["value"];var UserId=document["getElementById"]("UserId")["value"];var FaxTelNo=document["getElementById"]("FaxTelNo")["value"];var FaxMsg=document["getElementById"]("FaxMsg")["value"];var CountryData=document["getElementById"]("FaxCountry")["value"];var CountryDataArr=CountryData["split"](";");var CountryCode=CountryDataArr[0];var FaxAppId=CountryDataArr[1];var PrintFile="TMM-fax-"+FaxTelNo+"";o_obj= new ObjTmm();o_obj.SetUser(UserId,"user_key");o_obj.SetPaperSize(400,200);try{o_obj.SetSessionId(document["getElementById"]("sid")["value"]);} catch(err){} ;o_obj.SetDeliverCompany("InterFax.com");var FaxFileIdData=document["getElementById"]("FaxFileId")["value"];var FaxFileIdDataArr=FaxFileIdData["split"](";");o_obj.SetFileId(FaxFileIdDataArr[0]);FreeFax=false;o_obj.SetPdfFont("Courier",10);o_obj.AddTextLine(10,15,"Fax No:"+FaxTelNo);o_obj["ParagraphFlowingWidth"]=350;o_obj["PageBottomMargin"]=5;o_obj.SetPdfFont("Helvetica",10);o_obj.AddParagraph(10,30,FaxMsg+"\x0A\x0ADocument Fax Id: "+FaxFileIdDataArr[0]+"\x0AFile Name: "+FaxFileIdDataArr[2]+"\x0ANumber Of Pages: "+FaxFileIdDataArr[1]);o_obj.SetPrintFileName(PrintFile+".pdf");var DefaultFaxPaidPrice=document["getElementById"]("MailItemPrice")["value"];if(SendIndicator){o_obj.CopyTo(SystemUserId,"home");o_obj.SetMailItemPrice(DefaultFaxPaidPrice);o_obj.SendFax(FaxTelNo,FaxMsg);o_obj.SetPostBackForm("send_fax",FaxMsg);o_obj.StorePDF();} else {o_obj.Preview();} ;} catch(err){document["write"]("Error - Could not create document - "+err["description"]);} ;} ;function ObjFaxCountries(){o_ctnry= new ObjSmsCountries();return o_ctnry;} ;function ObjSmsCountries(){this["SmsArr"]= new Array();this["SmsArr"][0]="93;0;Afghanistan (93)";this["SmsArr"][1]="355;0;Albania (355)";this["SmsArr"][2]="213;0;Algeria (213)";this["SmsArr"][3]="376;0;Andorra (376)";this["SmsArr"][4]="244;0;Angola (244)";this["SmsArr"][5]="1264;0;Anguilla (1264)";this["SmsArr"][6]="1268;0;Antigua \x26 Barbuda (1268)";this["SmsArr"][7]="54;3285858;Argentina (54)";this["SmsArr"][8]="374;0;Armenia (374)";this["SmsArr"][9]="297;0;Aruba (297)";this["SmsArr"][10]="61;3286139;Australia (61)";this["SmsArr"][11]="43;0;Austria (43)";this["SmsArr"][12]="994;0;Azerbaijan (994)";this["SmsArr"][13]="1242;0;Bahamas, the (1242)";this["SmsArr"][14]="973;0;Bahrain (973)";this["SmsArr"][15]="880;0;Bangladesh (880)";this["SmsArr"][16]="1246;0;Barbados (1246)";this["SmsArr"][17]="1268;0;Barbuda (1268)";this["SmsArr"][18]="375;0;Belarus (375)";this["SmsArr"][19]="32;0;Belgium (32)";this["SmsArr"][20]="501;0;Belize (501)";this["SmsArr"][21]="229;0;Benin (229)";this["SmsArr"][22]="1441;0;Bermuda (1441)";this["SmsArr"][23]="975;0;Bhutan (975)";this["SmsArr"][24]="591;0;Bolivia (591)";this["SmsArr"][25]="387;0;Bosnia-Herzegovina (387)";this["SmsArr"][26]="267;0;Botswana (267)";this["SmsArr"][27]="55;3270666;Brazil (55)";this["SmsArr"][28]="1284;0;British Virgin Islands (1284)";this["SmsArr"][29]="673;0;Brunei (673)";this["SmsArr"][30]="359;0;Bulgaria (359)";this["SmsArr"][31]="226;0;Burkina Faso (226)";this["SmsArr"][32]="257;0;Burundi (257)";this["SmsArr"][33]="855;3271324;Cambodia (855)";this["SmsArr"][34]="237;0;Cameroon (237)";this["SmsArr"][35]="1;3270664;Canada (1)";this["SmsArr"][36]="34;0;Canary Islands (34)";this["SmsArr"][37]="238;0;Cape Verde (238)";this["SmsArr"][38]="1345;0;Cayman Islands (1345)";this["SmsArr"][39]="236;0;Central African Republic (236)";this["SmsArr"][40]="235;0;Chad (235)";this["SmsArr"][41]="56;0;Chile (56)";this["SmsArr"][42]="86;3285853;China (86)";this["SmsArr"][43]="57;0;Colombia (57)";this["SmsArr"][44]="269;0;Comoros (269)";this["SmsArr"][45]="242;0;Congo (242)";this["SmsArr"][46]="243;0;Congo, Democratic Republic (243)";this["SmsArr"][47]="682;0;Cook Islands (682)";this["SmsArr"][48]="506;0;Costa Rica (506)";this["SmsArr"][49]="385;0;Croatia (385)";this["SmsArr"][50]="53;0;Cuba (53)";this["SmsArr"][51]="5999;0;Curacao (5999)";this["SmsArr"][52]="357;0;Cyprus (357)";this["SmsArr"][53]="420;0;Czech Republic (420)";this["SmsArr"][54]="45;3271330;Denmark (45)";this["SmsArr"][55]="253;0;Djibouti (253)";this["SmsArr"][56]="1767;0;Dominica (1767)";this["SmsArr"][57]="1;0;Dominican Republic (1)";this["SmsArr"][58]="670;0;East Timor (670)";this["SmsArr"][59]="593;0;Ecuador (593)";this["SmsArr"][60]="20;0;Egypt (20)";this["SmsArr"][61]="503;0;El Salvador (503)";this["SmsArr"][62]="240;0;Equatorial Guinea (240)";this["SmsArr"][63]="372;0;Estonia (372)";this["SmsArr"][64]="251;0;Ethiopia (251)";this["SmsArr"][65]="500;0;Falkland Islands (500)";this["SmsArr"][66]="298;0;Faroe Islands (298)";this["SmsArr"][67]="679;0;Fiji (679)";this["SmsArr"][68]="358;3271331;Finland (358)";this["SmsArr"][69]="33;3285856;France (33)";this["SmsArr"][70]="594;0;French Guiana (594)";this["SmsArr"][71]="689;0;French Polynesia (689)";this["SmsArr"][72]="590;0;French West Indies (590)";this["SmsArr"][73]="241;0;Gabon (241)";this["SmsArr"][74]="220;0;Gambia (220)";this["SmsArr"][75]="995;0;Georgia (995)";this["SmsArr"][76]="49;3285854;Germany (49)";this["SmsArr"][77]="233;0;Ghana (233)";this["SmsArr"][78]="350;0;Gibraltar (350)";this["SmsArr"][79]="30;3271333;Greece (30)";this["SmsArr"][80]="299;0;Greenland (299)";this["SmsArr"][81]="1473;0;Grenada (1473)";this["SmsArr"][82]="590;0;Guadeloupe (590)";this["SmsArr"][83]="1671;0;Guam (1671)";this["SmsArr"][84]="502;0;Guatemala (502)";this["SmsArr"][85]="44;0;Guernsey (44)";this["SmsArr"][86]="224;0;Guinea (224)";this["SmsArr"][87]="592;0;Guyana (592)";this["SmsArr"][88]="509;0;Haiti (509)";this["SmsArr"][89]="504;0;Honduras (504)";this["SmsArr"][90]="852;3270671;HongKong (852)";this["SmsArr"][91]="36;0;Hungary (36)";this["SmsArr"][92]="354;0;Iceland (354)";this["SmsArr"][93]="91;3270675;India (91)";this["SmsArr"][94]="62;3270676;Indonesia (62)";this["SmsArr"][95]="98;0;Iran (98)";this["SmsArr"][96]="964;0;Iraq (964)";this["SmsArr"][97]="353;3271334;Ireland (353)";this["SmsArr"][98]="44;0;Isle of Man (44)";this["SmsArr"][99]="972;3271328;Israel (972)";this["SmsArr"][100]="39;0;Italy (39)";this["SmsArr"][101]="225;0;Ivory Coast (225)";this["SmsArr"][102]="1876;0;Jamaica (1876)";this["SmsArr"][103]="81;3270674;Japan (81)";this["SmsArr"][104]="44;0;Jersey (44)";this["SmsArr"][105]="962;0;Jordan (962)";this["SmsArr"][106]="7;0;Kazakhstan (7)";this["SmsArr"][107]="254;0;Kenya (254)";this["SmsArr"][108]="82;3271325;Korea (South) (82)";this["SmsArr"][109]="965;0;Kuwait (965)";this["SmsArr"][110]="996;0;Kyrgyzstan (996)";this["SmsArr"][111]="856;0;Lao (856)";this["SmsArr"][112]="371;0;Latvia (371)";this["SmsArr"][113]="961;0;Lebanon (961)";this["SmsArr"][114]="266;0;Lesotho (266)";this["SmsArr"][115]="231;0;Liberia (231)";this["SmsArr"][116]="218;0;Libya (218)";this["SmsArr"][117]="423;0;Liechtenstein (423)";this["SmsArr"][118]="370;0;Lithuania (370)";this["SmsArr"][119]="352;0;Luxembourg (352)";this["SmsArr"][120]="853;0;Macau (853)";this["SmsArr"][121]="389;0;Macedonia (389)";this["SmsArr"][122]="261;0;Madagascar (261)";this["SmsArr"][123]="265;0;Malawi (265)";this["SmsArr"][124]="60;3271326;Malaysia (60)";this["SmsArr"][125]="960;0;Maldives (960)";this["SmsArr"][126]="223;0;Mali (223)";this["SmsArr"][127]="356;0;Malta (356)";this["SmsArr"][128]="596;0;Martinique (596)";this["SmsArr"][129]="222;0;Mauritania (222)";this["SmsArr"][130]="230;0;Mauritius (230)";this["SmsArr"][131]="269;0;Mayotte Island (Comoros) (269)";this["SmsArr"][132]="52;3285857;Mexico (52)";this["SmsArr"][133]="373;0;Moldova (373)";this["SmsArr"][134]="377;0;Monaco (377)";this["SmsArr"][135]="976;0;Mongolia (976)";this["SmsArr"][136]="382;0;Montenegro (382)";this["SmsArr"][137]="1664;0;Montserrat (1664)";this["SmsArr"][138]="212;0;Morocco (212)";this["SmsArr"][139]="258;0;Mozambique (258)";this["SmsArr"][140]="95;0;Myanmar (95)";this["SmsArr"][141]="264;0;Namibia (264)";this["SmsArr"][142]="674;0;Nauru (674)";this["SmsArr"][143]="977;0;Nepal (977)";this["SmsArr"][144]="31;0;Netherlands (31)";this["SmsArr"][145]="599;0;Netherlands Antilles (599)";this["SmsArr"][146]="687;0;New Caledonia (687)";this["SmsArr"][147]="64;3270662;New Zealand (64)";this["SmsArr"][148]="505;0;Nicaragua (505)";this["SmsArr"][149]="227;0;Niger (227)";this["SmsArr"][150]="234;0;Nigeria (234)";this["SmsArr"][151]="47;3271335;Norway (47)";this["SmsArr"][152]="968;0;Oman (968)";this["SmsArr"][153]="92;0;Pakistan (92)";this["SmsArr"][154]="970;0;Palestine (+970) (970)";this["SmsArr"][155]="507;0;Panama (507)";this["SmsArr"][156]="675;0;Papua New Guinea (675)";this["SmsArr"][157]="595;0;Paraguay (595)";this["SmsArr"][158]="51;0;Peru (51)";this["SmsArr"][159]="63;3270668;Philippines (63)";this["SmsArr"][160]="48;0;Poland (48)";this["SmsArr"][161]="351;0;Portugal (351)";this["SmsArr"][162]="1;0;Puerto Rico (1)";this["SmsArr"][163]="974;0;Qatar (974)";this["SmsArr"][164]="262;0;Reunion (262)";this["SmsArr"][165]="40;0;Romania (40)";this["SmsArr"][166]="7;3285855;Russia (7)";this["SmsArr"][167]="250;0;Rwanda (250)";this["SmsArr"][168]="1670;0;Saipan (1670)";this["SmsArr"][169]="1684;0;Samoa (American) (1684)";this["SmsArr"][170]="378;0;San Marino (378)";this["SmsArr"][171]="882;0;Satellite Networks (882)";this["SmsArr"][172]="966;3270670;Saudi Arabia (966)";this["SmsArr"][173]="221;0;Senegal (221)";this["SmsArr"][174]="381;0;Serbia (381)";this["SmsArr"][175]="248;0;Seychelles (248)";this["SmsArr"][176]="232;0;Sierra Leone (232)";this["SmsArr"][177]="65;3270672;Singapore (65)";this["SmsArr"][178]="421;0;Slovakia (421)";this["SmsArr"][179]="386;0;Slovenia (386)";this["SmsArr"][180]="677;0;Solomon Islands (677)";this["SmsArr"][181]="252;0;Somalia (252)";this["SmsArr"][182]="27;0;South Africa (27)";this["SmsArr"][183]="34;0;Spain (34)";this["SmsArr"][184]="94;0;Sri Lanka (94)";this["SmsArr"][185]="1869;0;St. Kitts And Nevis (1869)";this["SmsArr"][186]="1758;0;St. Lucia (1758)";this["SmsArr"][187]="1784;0;St. Vincent (1784)";this["SmsArr"][188]="249;0;Sudan (249)";this["SmsArr"][189]="597;0;Suriname (597)";this["SmsArr"][190]="268;0;Swaziland (268)";this["SmsArr"][191]="46;3271336;Sweden (46)";this["SmsArr"][192]="41;3271337;Switzerland (41)";this["SmsArr"][193]="963;0;Syria (963)";this["SmsArr"][194]="886;3271364;Taiwan (886)";this["SmsArr"][195]="992;0;Tajikistan (992)";this["SmsArr"][196]="255;0;Tanzania (255)";this["SmsArr"][197]="66;3270677;Thailand (66)";this["SmsArr"][198]="228;0;Togo (228)";this["SmsArr"][199]="676;0;Tonga Islands (676)";this["SmsArr"][200]="1868;0;Trinidad and Tobago (1868)";this["SmsArr"][201]="216;0;Tunisia (216)";this["SmsArr"][202]="90;0;Turkey (90)";this["SmsArr"][203]="993;0;Turkmenistan (993)";this["SmsArr"][204]="1649;0;Turks and Caicos Islands (1649)";this["SmsArr"][205]="256;0;Uganda (256)";this["SmsArr"][206]="44;3285852;UK (44)";this["SmsArr"][207]="380;0;Ukraine (380)";this["SmsArr"][208]="971;3270669;United Arab Emirates (971)";this["SmsArr"][209]="598;0;Uruguay (598)";this["SmsArr"][210]="1340;0;US Virgin Islands (1340)";this["SmsArr"][211]="1;3286156;USA (1)";this["SmsArr"][212]="998;0;Uzbekistan (998)";this["SmsArr"][213]="678;0;Vanuatu (678)";this["SmsArr"][214]="39;0;Vatican City State (39)";this["SmsArr"][215]="58;0;Venezuela (58)";this["SmsArr"][216]="84;3271327;Vietnam (84)";this["SmsArr"][217]="967;0;Yemen (967)";this["SmsArr"][218]="260;0;Zambia (260)";this["SmsArr"][219]="259;0;Zanzibar (259)";this["SmsArr"][220]="263;0;Zimbabwe (263)";this["GetCountries"]=function (){return this["SmsArr"];} ;} ;function ObjCountriesExtDelivery(){this["PrintArr"]= new Array();this["PrintArr"][0]="LM;us;United_States;4";this["PrintArr"][1]="LM;gb;United_Kingdom;3";this["PrintArr"][2]="LM;nz;New_Zealand;155";this["PrintArr"][3]="LM;au;Australia;1";this["PrintArr"][4]="LM;ca;Canada;2";this["PrintArr"][5]="LM;mx;Mexico;140";this["PrintArr"][6]="LM;br;Brazil;33";this["PrintArr"][7]="LM;ar;Argentina;14";this["PrintArr"][8]="LM;de;Germany;83";this["PrintArr"][9]="LM;fr;France;76";this["PrintArr"][10]="LM;it;Italy;107";this["PrintArr"][11]="LM;es;Spain;200";this["PrintArr"][12]="LM;ru;Russian_Federation;179";this["PrintArr"][13]="LM;an;Netherlands;152";this["PrintArr"][14]="LM;ch;Switzerland;207";this["PrintArr"][15]="LM;be;Belgium;24";this["PrintArr"][16]="LM;tr;Turkey;218";this["PrintArr"][17]="LM;se;Sweden;206";this["PrintArr"][18]="LM;hu;Hungary;99";this["PrintArr"][19]="LM;sa;Saudi_Arabia;189";this["PrintArr"][20]="LM;ae;United_Arab_Emirates;224";this["PrintArr"][21]="LM;cn;China;46";this["PrintArr"][22]="LM;in;India;101";this["PrintArr"][23]="LM;hk;Hong_Kong;98";this["PrintArr"][24]="LM;sg;Singapore;193";this["PrintArr"][25]="LM;jp;Japan;109";this["PrintArr"][26]="LM;kr;Korea_Republic_of;244";this["PrintArr"][27]="LM;ph;Philippines;171";this["PrintArr"][28]="LM;id;Indonesia;102";this["PrintArr"][29]="LM;th;Thailand;212";this["PrintArr"][30]="LM;vn;Viet_Nam;231";this["PrintArr"][31]="LM;kh;Cambodia;39";this["PrintArr"][32]="LM;my;Malaysia;131";this["GetCountries"]=function (){return this["PrintArr"];} ;this["CheckCountry"]=function (CountryCode){var CountryArr=this["PrintArr"];var Country="";for(i=0;i<CountryArr["length"];i++){Country=CountryArr[i]["split"](";");if(CountryCode==Country[1]){return CountryArr[i];} ;} ;return "";} ;} ;function ObjPrintCountries(){this["PrintArr"]= new Array();this["PrintArr"][0]="001,us,United_States,PM,95";this["PrintArr"][1]="002,gb,United_Kingdom,PM,190";this["PrintArr"][2]="003,au,Australia,PM,190";this["PrintArr"][3]="004,af,Afghanistan,PM,210";this["PrintArr"][4]="005,ax,Aland_Islands,PM,210";this["PrintArr"][5]="006,al,Albania,PM,210";this["PrintArr"][6]="007,dz,Algeria,PM,210";this["PrintArr"][7]="008,as,American_Samoa,PM,210";this["PrintArr"][8]="009,ad,Andorra,PM,210";this["PrintArr"][9]="010,ao,Angola,PM,210";this["PrintArr"][10]="011,ai,Anguilla,PM,210";this["PrintArr"][11]="012,aq,Antarctica,PM,210";this["PrintArr"][12]="013,ag,Antigua_And_Barbuda,PM,210";this["PrintArr"][13]="014,ar,Argentina,PM,190";this["PrintArr"][14]="015,am,Armenia,PM,210";this["PrintArr"][15]="016,aw,Aruba,PM,210";this["PrintArr"][16]="017,at,Austria,PM,210";this["PrintArr"][17]="018,az,Azerbaijan,PM,210";this["PrintArr"][18]="019,bs,Bahamas,PM,210";this["PrintArr"][19]="020,bh,Bahrain,PM,210";this["PrintArr"][20]="021,bd,Bangladesh,PM,210";this["PrintArr"][21]="022,bb,Barbados,PM,210";this["PrintArr"][22]="023,by,Belarus,PM,210";this["PrintArr"][23]="024,be,Belgium,PM,190";this["PrintArr"][24]="025,bz,Belize,PM,210";this["PrintArr"][25]="026,bj,Benin,PM,210";this["PrintArr"][26]="027,bm,Bermuda,PM,210";this["PrintArr"][27]="028,bt,Bhutan,PM,210";this["PrintArr"][28]="029,bo,Bolivia,PM,210";this["PrintArr"][29]="030,ba,Bosnia_And_Herzegovina,PM,210";this["PrintArr"][30]="031,bw,Botswana,PM,210";this["PrintArr"][31]="032,bv,Bouvet_Island,PM,210";this["PrintArr"][32]="033,br,Brazil,PM,190";this["PrintArr"][33]="034,io,British_Indian_Ocean_Territory,PM,210";this["PrintArr"][34]="035,bn,Brunei_Darussalam,PM,210";this["PrintArr"][35]="036,bg,Bulgaria,PM,210";this["PrintArr"][36]="037,bf,Burkina_Faso,PM,210";this["PrintArr"][37]="038,bi,Burundi,PM,210";this["PrintArr"][38]="039,kh,Cambodia,PM,190";this["PrintArr"][39]="040,cm,Cameroon,PM,210";this["PrintArr"][40]="041,ca,Canada,PM,170";this["PrintArr"][41]="042,cv,Cape_Verde,PM,210";this["PrintArr"][42]="043,ky,Cayman_Islands,PM,210";this["PrintArr"][43]="044,cf,Central_African_Republic,PM,210";this["PrintArr"][44]="045,td,Chad,PM,210";this["PrintArr"][45]="046,cl,Chile,PM,210";this["PrintArr"][46]="047,cn,China,PM,190";this["PrintArr"][47]="048,cx,Christmas_Island,PM,210";this["PrintArr"][48]="049,cc,Cocos_(Keeling)_Islands,PM,210";this["PrintArr"][49]="050,co,Colombia,PM,210";this["PrintArr"][50]="051,km,Comoros,PM,210";this["PrintArr"][51]="052,cg,Congo,PM,210";this["PrintArr"][52]="053,cd,Congo,PM,210";this["PrintArr"][53]="054,ck,Cook_Islands,PM,210";this["PrintArr"][54]="055,cr,Costa_Rica,PM,210";this["PrintArr"][55]="056,ci,Cote_D_ivoire,PM,210";this["PrintArr"][56]="057,hr,Croatia,PM,210";this["PrintArr"][57]="058,cu,Cuba,PM,210";this["PrintArr"][58]="059,cy,Cyprus,PM,210";this["PrintArr"][59]="060,cz,Czech_Republic,PM,210";this["PrintArr"][60]="061,dk,Denmark,PM,210";this["PrintArr"][61]="062,dj,Djibouti,PM,210";this["PrintArr"][62]="063,dm,Dominica,PM,210";this["PrintArr"][63]="064,do,Dominican_Republic,PM,210";this["PrintArr"][64]="065,ec,Ecuador,PM,210";this["PrintArr"][65]="066,eg,Egypt,PM,210";this["PrintArr"][66]="067,sv,El_Salvador,PM,210";this["PrintArr"][67]="068,gq,Equatorial_Guinea,PM,210";this["PrintArr"][68]="069,er,Eritrea,PM,210";this["PrintArr"][69]="070,ee,Estonia,PM,210";this["PrintArr"][70]="071,et,Ethiopia,PM,210";this["PrintArr"][71]="072,fk,Falkland_Islands_(Malvinas),PM,210";this["PrintArr"][72]="073,fo,Faroe_Islands,PM,210";this["PrintArr"][73]="074,fj,Fiji,PM,210";this["PrintArr"][74]="075,fi,Finland,PM,210";this["PrintArr"][75]="076,fr,France,PM,190";this["PrintArr"][76]="077,gf,French_Guiana,PM,210";this["PrintArr"][77]="078,pf,French_Polynesia,PM,210";this["PrintArr"][78]="079,tf,French_Southern_Territories,PM,210";this["PrintArr"][79]="080,ga,Gabon,PM,210";this["PrintArr"][80]="081,gm,Gambia,PM,210";this["PrintArr"][81]="082,ge,Georgia,PM,210";this["PrintArr"][82]="083,de,Germany,PM,190";this["PrintArr"][83]="084,gh,Ghana,PM,210";this["PrintArr"][84]="085,gi,Gibraltar,PM,210";this["PrintArr"][85]="086,gr,Greece,PM,210";this["PrintArr"][86]="087,gl,Greenland,PM,210";this["PrintArr"][87]="088,gd,Grenada,PM,210";this["PrintArr"][88]="089,gp,Guadeloupe,PM,210";this["PrintArr"][89]="090,gu,Guam,PM,210";this["PrintArr"][90]="091,gt,Guatemala,PM,210";this["PrintArr"][91]="092,gg,Guernsey,PM,210";this["PrintArr"][92]="093,gn,Guinea,PM,210";this["PrintArr"][93]="094,gw,Guinea-Bissau,PM,210";this["PrintArr"][94]="095,gy,Guyana,PM,210";this["PrintArr"][95]="096,ht,Haiti,PM,210";this["PrintArr"][96]="097,hm,Heard_Island_And_Mcdonald_Islands,PM,210";this["PrintArr"][97]="098,va,Holy_See_(Vatican_City_State),PM,210";this["PrintArr"][98]="099,hn,Honduras,PM,210";this["PrintArr"][99]="100,hk,Hong_Kong,PM,190";this["PrintArr"][100]="101,hu,Hungary,PM,190";this["PrintArr"][101]="102,is,Iceland,PM,210";this["PrintArr"][102]="103,in,India,PM,190";this["PrintArr"][103]="104,id,Indonesia,PM,190";this["PrintArr"][104]="105,ir,Iran,PM,210";this["PrintArr"][105]="106,iq,Iraq,PM,210";this["PrintArr"][106]="107,ie,Ireland,PM,210";this["PrintArr"][107]="108,im,Isle_Of_Man,PM,210";this["PrintArr"][108]="109,il,Israel,PM,210";this["PrintArr"][109]="110,it,Italy,PM,190";this["PrintArr"][110]="111,jm,Jamaica,PM,210";this["PrintArr"][111]="112,jp,Japan,PM,190";this["PrintArr"][112]="113,je,Jersey,PM,210";this["PrintArr"][113]="114,jo,Jordan,PM,210";this["PrintArr"][114]="115,kz,Kazakhstan,PM,210";this["PrintArr"][115]="116,ke,Kenya,PM,210";this["PrintArr"][116]="117,ki,Kiribati,PM,210";this["PrintArr"][117]="118,kp,Korea_Democratic_Peoples_Republic_of,PM,210";this["PrintArr"][118]="119,kr,Korea_Republic_of,PM,190";this["PrintArr"][119]="120,kw,Kuwait,PM,210";this["PrintArr"][120]="121,kg,Kyrgyzstan,PM,210";this["PrintArr"][121]="122,la,Lao_Peoples_Democratic_Republic,PM,210";this["PrintArr"][122]="123,lv,Latvia,PM,210";this["PrintArr"][123]="124,lb,Lebanon,PM,210";this["PrintArr"][124]="125,ls,Lesotho,PM,210";this["PrintArr"][125]="126,lr,Liberia,PM,210";this["PrintArr"][126]="127,ly,Libyan_Arab_Jamahiriya,PM,210";this["PrintArr"][127]="128,li,Liechtenstein,PM,210";this["PrintArr"][128]="129,lt,Lithuania,PM,210";this["PrintArr"][129]="130,lu,Luxembourg,PM,210";this["PrintArr"][130]="131,mo,Macao,PM,210";this["PrintArr"][131]="132,mk,Macedonia,PM,210";this["PrintArr"][132]="133,mg,Madagascar,PM,210";this["PrintArr"][133]="134,mw,Malawi,PM,210";this["PrintArr"][134]="135,my,Malaysia,PM,190";this["PrintArr"][135]="136,mv,Maldives,PM,210";this["PrintArr"][136]="137,ml,Mali,PM,210";this["PrintArr"][137]="138,mt,Malta,PM,210";this["PrintArr"][138]="139,mh,Marshall_Islands,PM,210";this["PrintArr"][139]="140,mq,Martinique,PM,210";this["PrintArr"][140]="141,mr,Mauritania,PM,210";this["PrintArr"][141]="142,mu,Mauritius,PM,210";this["PrintArr"][142]="143,yt,Mayotte,PM,210";this["PrintArr"][143]="144,mx,Mexico,PM,170";this["PrintArr"][144]="145,fm,Micronesia,PM,210";this["PrintArr"][145]="146,md,Moldova,PM,210";this["PrintArr"][146]="147,mc,Monaco,PM,210";this["PrintArr"][147]="148,mn,Mongolia,PM,210";this["PrintArr"][148]="149,me,Montenegro,PM,210";this["PrintArr"][149]="150,ms,Montserrat,PM,210";this["PrintArr"][150]="151,ma,Morocco,PM,210";this["PrintArr"][151]="152,mz,Mozambique,PM,210";this["PrintArr"][152]="153,mm,Myanmar,PM,210";this["PrintArr"][153]="154,na,Namibia,PM,210";this["PrintArr"][154]="155,nr,Nauru,PM,210";this["PrintArr"][155]="156,np,Nepal,PM,210";this["PrintArr"][156]="157,nl,Netherlands,PM,190";this["PrintArr"][157]="158,an,Netherlands_Antilles,PM,210";this["PrintArr"][158]="159,nc,New_Caledonia,PM,210";this["PrintArr"][159]="160,nz,New_Zealand,PM,190";this["PrintArr"][160]="161,ni,Nicaragua,PM,210";this["PrintArr"][161]="162,ne,Niger,PM,210";this["PrintArr"][162]="163,ng,Nigeria,PM,210";this["PrintArr"][163]="164,nu,Niue,PM,210";this["PrintArr"][164]="165,nf,Norfolk_Island,PM,210";this["PrintArr"][165]="166,mp,Northern_Mariana_Islands,PM,210";this["PrintArr"][166]="167,no,Norway,PM,210";this["PrintArr"][167]="168,om,Oman,PM,210";this["PrintArr"][168]="169,pk,Pakistan,PM,210";this["PrintArr"][169]="170,pw,Palau,PM,210";this["PrintArr"][170]="171,ps,Palestinian_Territory,PM,210";this["PrintArr"][171]="172,pa,Panama,PM,210";this["PrintArr"][172]="173,pg,Papua_New_Guinea,PM,210";this["PrintArr"][173]="174,py,Paraguay,PM,210";this["PrintArr"][174]="175,pe,Peru,PM,210";this["PrintArr"][175]="176,ph,Philippines,PM,190";this["PrintArr"][176]="177,pn,Pitcairn,PM,210";this["PrintArr"][177]="178,pl,Poland,PM,210";this["PrintArr"][178]="179,pt,Portugal,PM,210";this["PrintArr"][179]="180,pr,Puerto_Rico,PM,210";this["PrintArr"][180]="181,qa,Qatar,PM,210";this["PrintArr"][181]="182,re,Reunion,PM,210";this["PrintArr"][182]="183,ro,Romania,PM,210";this["PrintArr"][183]="184,ru,Russian_Federation,PM,190";this["PrintArr"][184]="185,rw,Rwanda,PM,210";this["PrintArr"][185]="186,sh,Saint_Helena,PM,210";this["PrintArr"][186]="187,kn,Saint_Kitts_And_Nevis,PM,210";this["PrintArr"][187]="188,lc,Saint_Lucia,PM,210";this["PrintArr"][188]="189,PM,Saint_Pierre_And_Miquelon,PM,210";this["PrintArr"][189]="190,vc,Saint_Vincent_And_The_Grenadines,PM,210";this["PrintArr"][190]="191,ws,Samoa,PM,210";this["PrintArr"][191]="192,sm,San_Marino,PM,210";this["PrintArr"][192]="193,st,Sao_Tome_And_Principe,PM,210";this["PrintArr"][193]="194,sa,Saudi_Arabia,PM,190";this["PrintArr"][194]="195,sn,Senegal,PM,210";this["PrintArr"][195]="196,rs,Serbia,PM,210";this["PrintArr"][196]="197,sc,Seychelles,PM,210";this["PrintArr"][197]="198,sl,Sierra_Leone,PM,210";this["PrintArr"][198]="199,sg,Singapore,PM,190";this["PrintArr"][199]="200,sk,Slovakia,PM,210";this["PrintArr"][200]="201,si,Slovenia,PM,210";this["PrintArr"][201]="202,sb,Solomon_Islands,PM,210";this["PrintArr"][202]="203,so,Somalia,PM,210";this["PrintArr"][203]="204,za,South_Africa,PM,210";this["PrintArr"][204]="205,gs,South_Georgia,PM,210";this["PrintArr"][205]="206,es,Spain,PM,190";this["PrintArr"][206]="207,lk,Sri_Lanka,PM,210";this["PrintArr"][207]="208,sd,Sudan,PM,210";this["PrintArr"][208]="209,sr,Suriname,PM,210";this["PrintArr"][209]="210,sj,Svalbard_And_Jan_Mayen,PM,210";this["PrintArr"][210]="211,sz,Swaziland,PM,210";this["PrintArr"][211]="212,se,Sweden,PM,190";this["PrintArr"][212]="213,ch,Switzerland,PM,190";this["PrintArr"][213]="214,sy,Syrian_Arab_Republic,PM,210";this["PrintArr"][214]="215,tw,Taiwan,PM,210";this["PrintArr"][215]="216,tj,Tajikistan,PM,210";this["PrintArr"][216]="217,tz,Tanzania,PM,210";this["PrintArr"][217]="218,th,Thailand,PM,190";this["PrintArr"][218]="219,tl,Timor-Leste,PM,210";this["PrintArr"][219]="220,tg,Togo,PM,210";this["PrintArr"][220]="221,tk,Tokelau,PM,210";this["PrintArr"][221]="222,to,Tonga,PM,210";this["PrintArr"][222]="223,tt,Trinidad_And_Tobago,PM,210";this["PrintArr"][223]="224,tn,Tunisia,PM,210";this["PrintArr"][224]="225,tr,Turkey,PM,190";this["PrintArr"][225]="226,tm,Turkmenistan,PM,210";this["PrintArr"][226]="227,tc,Turks_And_Caicos_Islands,PM,210";this["PrintArr"][227]="228,tv,Tuvalu,PM,210";this["PrintArr"][228]="229,ug,Uganda,PM,210";this["PrintArr"][229]="230,ua,Ukraine,PM,210";this["PrintArr"][230]="231,ae,United_Arab_Emirates,PM,190";this["PrintArr"][231]="232,um,United_States_Minor_Outlying_Islands,PM,210";this["PrintArr"][232]="233,uy,Uruguay,PM,210";this["PrintArr"][233]="234,uz,Uzbekistan,PM,210";this["PrintArr"][234]="235,vu,Vanuatu,PM,210";this["PrintArr"][235]="236,ve,Venezuela,PM,210";this["PrintArr"][236]="237,vn,Viet_Nam,PM,190";this["PrintArr"][237]="238,vg,British_Virgin_Islands,PM,210";this["PrintArr"][238]="239,vi,U.S._Virgin_Islands,PM,210";this["PrintArr"][239]="240,wf,Wallis_And_Futuna,PM,210";this["PrintArr"][240]="241,eh,Western_Sahara,PM,210";this["PrintArr"][241]="242,ye,Yemen,PM,210";this["PrintArr"][242]="243,zm,Zambia,PM,210";this["PrintArr"][243]="244,zw,Zimbabwe,PM,210";this["GetCountries"]=function (){return this["PrintArr"];} ;} ;function ObjTmmAPI(){this["UserId"]="";this["UserKey"]="";this["SmsAppId"]="";this["SmsTelNo"]="";this["SmsMsg"]="";this["SmsReturnCode"]=0;this["SetUser"]=function (Id,Key){this["UserId"]=Id;this["UserKey"]=Key;} ;this["SetSmsAppId"]=function (AppId){this["SmsAppId"]=AppId;} ;this["Sms"]=function (CountryCode,TelNo,Msg){CountryCode=CountryCode["toLowerCase"]();Msg=Msg["replace"](/'/g,"\x26#39;");Msg=Msg["replace"](/&/g,"");Msg=Msg["replace"](/=/g,"");if(Msg["length"]>160){Msg=Msg["substring"](0,160);} ;o_ctnry= new ObjSmsCountries();var CountryArr=o_ctnry.GetCountries();var Country="";for(i=0;i<CountryArr["length"];i++){Country=CountryArr[i]["split"](";");if(parseInt(Country[0])==parseInt(CountryCode)){CountryCode=Country[0];break ;} ;} ;var CompleteSmsTelNo=TelNo;CompleteSmsTelNo=CompleteSmsTelNo["replace"](/^[0]+/g,CountryCode);if(CompleteSmsTelNo["substring"](0,CountryCode["length"])!=CountryCode){CompleteSmsTelNo=CountryCode+CompleteSmsTelNo;} ;CompleteSmsTelNo=CompleteSmsTelNo["replace"](/ /g,"");this["SmsTelNo"]=CompleteSmsTelNo;this["SmsMsg"]=Msg;} ;this["Send"]=function (){this.GetAjaxPage("http://www.themailmonster.com/sendsms.jsp?UserId="+this["UserId"]+"\x26UserKey="+this["UserKey"]+"\x26SmsAppId="+this["SmsAppId"]+"\x26SmsTelNo="+this["SmsTelNo"]+"\x26SmsMsg="+this["SmsMsg"]+"\x26SMSFunction=SMSAPI");} ;this["GetAjaxPage"]=function (AjaxRequestPage){var xmlHttp;try{xmlHttp= new XMLHttpRequest();} catch(e){try{xmlHttp= new ActiveXObject("Msxml2.XMLHTTP");} catch(e){try{xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");} catch(e){alert("Your browser does not support AJAX!");return false;} ;} ;} ;xmlHttp["onreadystatechange"]=function (){if(xmlHttp["readyState"]==4){this["SmsReturnCode"]=xmlHttp["responseText"];} ;} ;xmlHttp["open"]("GET",AjaxRequestPage,true);xmlHttp["send"](null);} ;} ;
