// remote scripting library // (c) copyright 2005 modernmethod, inc var sajax_debug_mode = false; var sajax_request_type = "POST"; var sajax_target_id = ""; var sajax_failure_redirect = ""; function sajax_debug(text) { if (sajax_debug_mode) alert(text); } function sajax_init_object() { sajax_debug("sajax_init_object() called..") var A; var msxmlhttp = new Array( 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'); for (var i = 0; i < msxmlhttp.length; i++) { try { A = new ActiveXObject(msxmlhttp[i]); } catch (e) { A = null; } } if(!A && typeof XMLHttpRequest != "undefined") A = new XMLHttpRequest(); if (!A) sajax_debug("Could not create connection object."); return A; } var sajax_requests = new Array(); function sajax_cancel() { for (var i = 0; i < sajax_requests.length; i++) sajax_requests[i].abort(); } function sajax_do_call(func_name, args) { var i, x, n; var uri; var post_data; var target_id; sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + sajax_target_id); target_id = sajax_target_id; if (typeof(sajax_request_type) == "undefined" || sajax_request_type == "") sajax_request_type = "GET"; uri = "/js/kris-and-josh.js.php"; if (sajax_request_type == "GET") { if (uri.indexOf("?") == -1) uri += "?rs=" + escape(func_name); else uri += "&rs=" + escape(func_name); uri += "&rst=" + escape(sajax_target_id); uri += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) uri += "&rsargs[]=" + escape(args[i]); post_data = null; } else if (sajax_request_type == "POST") { post_data = "rs=" + escape(func_name); post_data += "&rst=" + escape(sajax_target_id); post_data += "&rsrnd=" + new Date().getTime(); for (i = 0; i < args.length-1; i++) post_data = post_data + "&rsargs[]=" + escape(args[i]); } else { alert("Illegal request type: " + sajax_request_type); } x = sajax_init_object(); if (x == null) { if (sajax_failure_redirect != "") { location.href = sajax_failure_redirect; return false; } else { sajax_debug("NULL sajax object for user agent:\n" + navigator.userAgent); return false; } } else { x.open(sajax_request_type, uri, true); // window.open(uri); sajax_requests[sajax_requests.length] = x; if (sajax_request_type == "POST") { x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1"); x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); } x.onreadystatechange = function() { if (x.readyState != 4) return; sajax_debug("received " + x.responseText); var status; var data; var txt = x.responseText.replace(/^\s*|\s*$/g,""); status = txt.charAt(0); data = txt.substring(2); if (status == "") { // let's just assume this is a pre-response bailout and let it slide for now } else if (status == "-") alert("Error: " + data); else { if (target_id != "") document.getElementById(target_id).innerHTML = eval(data); else { try { var callback; var extra_data = false; if (typeof args[args.length-1] == "object") { callback = args[args.length-1].callback; extra_data = args[args.length-1].extra_data; } else { callback = args[args.length-1]; } callback(eval(data), extra_data); } catch (e) { sajax_debug("Caught error " + e + ": Could not eval " + data ); } } } } } sajax_debug(func_name + " uri = " + uri + "/post = " + post_data); x.send(post_data); sajax_debug(func_name + " waiting.."); delete x; return true; } // wrapper for commentForm function x_commentForm() { sajax_do_call("commentForm", x_commentForm.arguments); } // wrapper for getComments function x_getComments() { sajax_do_call("getComments", x_getComments.arguments); } // wrapper for mailingListForm function x_mailingListForm() { sajax_do_call("mailingListForm", x_mailingListForm.arguments); } // wrapper for addAddress function x_addAddress() { sajax_do_call("addAddress", x_addAddress.arguments); } // wrapper for unsubscribeForm function x_unsubscribeForm() { sajax_do_call("unsubscribeForm", x_unsubscribeForm.arguments); } // wrapper for removeAddress function x_removeAddress() { sajax_do_call("removeAddress", x_removeAddress.arguments); } var map = null; var mgr = null; var geocoder = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(40, -98), 3); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); geocoder = new GClientGeocoder(); window.setTimeout(setupMarkers, 0); } } function createMarker(point,comment) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(comment); }); return marker; } function getMarkers(n) { var batch = []; var latlng = ""; if (n == 1) { latlng = new GLatLng(30.084541,-95.419283); batch.push(createMarker(latlng,'
the leongs says:
hey kris and josh,

sorry we forgot to mail out our not able to make it RSVP :( BUT WE...more
')); latlng = new GLatLng(14.609620,121.005890); batch.push(createMarker(latlng,'
\"AteAte Joh-An says:
I\'m happy for you both.
Good luck on the day itself and have fun in Ecuador! :) Post picture...more
')); latlng = new GLatLng(25.793095,-80.134904); batch.push(createMarker(latlng,'
\"Debbie\"Debbie says:
I love the Party Posse!! Too cute. I am getting so excited for the wedding!!!
LOVE
De...more
')); latlng = new GLatLng(34.053490,-118.245319); batch.push(createMarker(latlng,'
\"christiaan\"christiaan says:
i love the card!

like i already told kristin, i\'m not sending the rsvp cause i need t...more
')); latlng = new GLatLng(39.287278,-77.200343); batch.push(createMarker(latlng,'
kunni biener says:
excellent choices on the wedding party.
')); latlng = new GLatLng(38.804565,-77.043079); batch.push(createMarker(latlng,'
\"Merrilee\"Merrilee says:
I love your web site!!!
')); latlng = new GLatLng(40.497508,-74.524099); batch.push(createMarker(latlng,'
Johnny and Lani Chavez says:
Kristin and Josh:
Congratulations in advance! (Remember us from Manila?) You guys make a v...more
')); } if (n == 2) { latlng = new GLatLng(40.936088,-74.131969); batch.push(createMarker(latlng,'
Renee, Jim, Danielle and Jessica says:
Loved the wedding invitations. We are all so excited!
')); latlng = new GLatLng(30.451734,-97.575160); batch.push(createMarker(latlng,'
\"LiLi and DJ Johnson says:
you 2 are soooo sUper cUte! we can\'t wait to come up and witness one of the best moments everrr in ...more
')); latlng = new GLatLng(30.368339,-97.671541); batch.push(createMarker(latlng,'
\"RodelRodel and Aurora says:
Great website! We\'re looking forward to the celebration.
')); latlng = new GLatLng(14.609620,121.005890); batch.push(createMarker(latlng,'
\"AteAte Michelle, Kuya Francis & Mikee says:
Hi Kris and Josh... I haven\'t seen your save-the-date card... I always miss asking it from Mom whene...more
')); latlng = new GLatLng(14.609620,121.005890); batch.push(createMarker(latlng,'
\"AteAte Joh-An, Kuya Xerx, Sam and Ximon says:
I\'m not in your map! haha.
Congratulations to both of you! Just had a chance to see your webs...more
')); latlng = new GLatLng(30.084541,-95.419283); batch.push(createMarker(latlng,'
\"UncleUncle Roger and Auntie Lilia says:
We\'ve been praying every day for a successful wedding preparation and celebration for you darling ni...more
')); latlng = new GLatLng(40.936088,-74.131969); batch.push(createMarker(latlng,'
jessica says:
hey! can\'t wait for the wedding. :] know it\'s going to be great.
')); latlng = new GLatLng(40.114200,-88.243499); batch.push(createMarker(latlng,'
\"katie.\"katie. says:
i had to represent the midwest on the map. and, obviously, i\'m so excited to see how cute your wedd...more
')); latlng = new GLatLng(39.126553,-77.239855); batch.push(createMarker(latlng,'
wendy Weisabard says:
Josh -- I have known you for a long time and something in my memory makes me think that today is the...more
')); latlng = new GLatLng(39.126553,-77.239855); batch.push(createMarker(latlng,'
wendy weisbard says:
I thought we had great Save the Date cards for our wedding, but yours are the best I have ever seen....more
')); latlng = new GLatLng(47.613148,-122.316605); batch.push(createMarker(latlng,'
\"andy\"andy says:
yes. i win furthest comment so far! if this counts as a comment.
')); latlng = new GLatLng(38.804565,-77.043079); batch.push(createMarker(latlng,'
\"Merrilee\"Merrilee says:
The two of you are very special and I wish you the most exciting future together.
')); latlng = new GLatLng(32.221553,-110.969754); batch.push(createMarker(latlng,'
\"ChristopherChristopher & Alison says:
Have a blast! Wish I could make it! Make a lovely video and take lots of pictures!!!!

...more
')); latlng = new GLatLng(30.095805,-95.617089); batch.push(createMarker(latlng,'
\"michaelmichael and angela leong says:
can\'t wait. we love your save the date card. adn can\'t wait to celebrate with YA\'LL. yeee haw!!
')); latlng = new GLatLng(40.681459,-73.567498); batch.push(createMarker(latlng,'
\"Jeanne,Jeanne, Ronny & Sophie says:
We are very excited for the both of you! This will be Sophie\'s first wedding and she can\'t wait. The...more
')); latlng = new GLatLng(40.918929,-74.109661); batch.push(createMarker(latlng,'
Aunt Renee says:
I especially love what\'s under the bubbles, we can\'t wait.
')); latlng = new GLatLng(25.778621,-80.139461); batch.push(createMarker(latlng,'
\"Debbie\"Debbie says:
This is the cutest thing EVER! I am so excited. LOVE YOU GUYS XOXOXOXOX
')); latlng = new GLatLng(30.070124,-95.515886); batch.push(createMarker(latlng,'
Paul , Hazel and J-Cubed says:
WooHoo got the save the date, just need to find that suite. Found the video and can\'t wait!!!!!!!
')); latlng = new GLatLng(41.979591,-87.702320); batch.push(createMarker(latlng,'
\"tonytony & shelly says:
love the website! we\'re so excited and can\'t wait to celebrate the big day with u guys!
')); latlng = new GLatLng(42.588117,-71.370810); batch.push(createMarker(latlng,'
Sue says:
We are very excited for both of you and can\'t wait for the big day !!
')); latlng = new GLatLng(38.960007,-77.128407); batch.push(createMarker(latlng,'
\"joanjoan winer says:
Loved the save the date card. Count me in.

The proposal video with all your friends ...more
')); latlng = new GLatLng(38.789431,-77.135522); batch.push(createMarker(latlng,'
\"PaulPaul Bousel says:
This is getting exciting! What hidden video?
')); latlng = new GLatLng(29.736425,-95.581021); batch.push(createMarker(latlng,'
\"*k*\"*k* says:
first post from texasssssss =) sUper website, guys... and i found the hidden video! WOOHOO! hah. Y...more
')); latlng = new GLatLng(38.811831,-77.053486); batch.push(createMarker(latlng,'
\"FayeFaye Brenner says:
I love both of you and couldn\'t be more excited to celebrate your love for each other.
')); latlng = new GLatLng(40.769803,-73.920343); batch.push(createMarker(latlng,'
\"Josh\"Josh says:
Hello there, we\'d love to hear from you!
')); } return batch; } function setupMarkers() { var mgr = new GMarkerManager(map); mgr.addMarkers(getMarkers(1), 3); mgr.addMarkers(getMarkers(2), 6); mgr.refresh(); } //////////////////////////////////////////// // Universal Functions // //////////////////////////////////////////// function updateContent(content) { document.getElementById("content").innerHTML = content; } function validateEmail(email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(reg.test(email) == false) { return "invalid"; } } function linksExternal() { if (document.getElementsByTagName) { var anchors = document.getElementsByTagName("a"); for (var i=0; i"; document.getElementById("commentForm").innerHTML = content; } //////////////////////////////////////////// // Mailing List Functions // //////////////////////////////////////////// function addAddress() { var error = ""; var name = document.getElementById("name").value; var email = document.getElementById("email").value; if (name == "") { error = "You must add your name!"; } else if (email == "") { error = "You must add a you email address!"; } else if (validateEmail(email) == "invalid") { error = "Your email address is not valid!"; } if (error != "") { x_mailingListForm(name,email,error,updateContent); } else { x_addAddress(name,email,updateMailingListForm); } } function removeAddress() { var error = ""; var email = document.getElementById("email").value; if (email == "") { error = "You must add a you email address!"; } else if (validateEmail(email) == "invalid") { error = "Your email address is not valid!"; } if (error != "") { x_unsubscribeForm(email,error,updateContent); } else { x_removeAddress(email,updateMailingListForm); } } function updateMailingListForm(content) { document.getElementById("commentForm").innerHTML = content; }