//log.js
// Logs user actions
//setup logging
try{
document.observe('dom:loaded', function() {
jQuery('.beOther').each(function(index,link){
jQuery(link).click( function( event ) {
attachLogOther( link );
});
});
});
}catch(err){
//console.log
}
//Logs the action
function logAction( categoryID, extra ){
try{
var request = jQuery.ajax({
type: "GET",
url: '/index.php',
data: {
method:'jslog',
categoryID: categoryID,
extra:extra,
ts: new Date().getTime() }
});
request.success(function( msg ) {});
request.fail(function( jqXHR, textStatus ) { });
}catch(err){
//console.log
}
}
function attachLogOther( link ){
//window.location.replace(link.href);
//event.stop();
var extra = link.href ;
if( link.getAttribute("obextra") != null ){
extra =link.getAttribute("obextra");
}
var cat = "";
if( link.getAttribute("obcat") != null ){
cat =link.getAttribute("obcat");
}
/*else if( link.getAttribute("data-obcat") != null ){{
cat =link.getAttribute("data-obcat");
}*/
logOther( cat ,extra );
//event.stop();
}
function logOther( category , extra ){
try{
category =encodeURIComponent(category);
extra =encodeURIComponent(extra);
var request = jQuery.ajax({
type: "GET",
url: '/index.php',
data: {
method:'jslogOther',
category: category,
extra:extra,
ts: new Date().getTime() }
});
request.success(function( msg ) {});
request.fail(function( jqXHR, textStatus ) { });
}catch(err){
//console.log
}
}
//googleMap.js
// JavaScript Document
var mapO
var markerO
var gdir
var gDivName
function showGoogleMap( divName ){
gDivName = divName;
renderMap();
}
function renderMap(){
//if (GBrowserIsCompatible()) {
var latlng = new google.maps.LatLng(loclat, loclon);
var gOptions = {
zoom: loczoom ,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
streetViewControl: false,
panControl: true,
zoomControl: true
};
var text;
text = companyName + "
\n";
text += ppaPhone + "
";
var map = new google.maps.Map(document.getElementById(gDivName) , gOptions );
//map.addControl(new GSmallMapControl());
//map.setCenter(new GLatLng(loclat,loclon), loczoom);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: ""
});
var node;
node = document.createElement('div');
node.setAttribute('class','gmapBubble');
node.appendChild(document.createTextNode(companyName));
node.appendChild(document.createElement('br'));
node.appendChild(document.createTextNode(formatPhone(ppaPhone)));
node.appendChild(document.createElement('br'));
var link = document.createElement('a');
link.setAttribute('href','javascript:showEmailForm()');
link.appendChild(document.createTextNode("Send us an email."));
node.appendChild(link);
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
if(isAndroid) {
var link = document.createElement('a');
link.setAttribute('href','geo:' + loclat + ',' + loclon);
link.appendChild(document.createTextNode("Navigate here"));
node.appendChild(document.createElement('br'));
node.appendChild(link);
}
//map.openInfoWindow(map.getCenter(), node );
var infowindow = new google.maps.InfoWindow({
content: node
});
google.maps.event.addListener( marker, 'click', function (){infowindow.open( map, marker );} );
infowindow.open( map, marker );
mapO = map;
//}
//var point = new google.maps.LatLng(loclat, loclon);
//mapO.addOverlay(new google.maps.Marker(point));
}
function showDirectionsFrom(divName, address){
showDirections(divName, address );
}
function showDirections(divName, full){
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
//clear any old directions
var dirDiv = document.getElementById(divName)
if (dirDiv .hasChildNodes()) while (dirDiv .childNodes.length >= 1) dirDiv .removeChild(dirDiv .firstChild);
renderMap();
directionsDisplay = new google.maps.DirectionsRenderer();
directionsDisplay.setPanel( null );
directionsDisplay.setMap(mapO);
directionsDisplay.setPanel(document.getElementById(divName) );
var dest = loclat + " , " + loclon ;
if( directionsUseAddr != false ){
dest = directionsUseAddr ;
}
var request = {
origin:full,
destination:dest,
travelMode: google.maps.TravelMode.DRIVING
};
directionsService.route(request, function(result, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(result);
}
});
}
function formatPhone(num){
var _return=false;
if(num.length == 10){
_return="(";
var ini = num.substring(0,3);
_return+=ini+") ";
var st = num.substring(3,6);
_return+=st+"-";
var end = num.substring(6,10);
_return+=end;
}else if(num.length == 7){
_return="";
var st = num.substring(3,6);
_return+=st+"-";
var end = num.substring(6,10);
_return+=end;
}else{
_return=num;
}
return _return;
}
function handleErrors(){
if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code);
// else if (gdir.getStatus().code == G_UNAVAILABLE_ADDRESS) <--- Doc bug... this is either not defined, or Doc is wrong
// alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.\n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_BAD_KEY)
alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code);
else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code);
else alert("An unknown error occurred.");
}
function onGDirectionsLoad(){
// Use this function to access information about the latest load()
// results.
// e.g.
// document.getElementById("getStatus").innerHTML = gdir.getStatus().code;
// and yada yada yada...
}
//ResponsiveSlidesHelper.js
function setupServiceCarousel( ) {
var c = null;
var maxSlides = 4 ;
var addOverflow = true;
var width = jQuery(window).width();
if (width <= 480) {
c = 1;
} else if (width <= 768) {
c = 2;
} else {
c = maxSlides;
}
var ul = jQuery("
");
var li = new jQuery("- ");
jQuery("#mySlides li").each(function (i, o) {
li.append(jQuery(o).html());
if ((i + 1) % c === 0) {
ul.append(li);
li = new jQuery("
- ");
}
});
if( li.children().length > 0 && addOverflow == true ){
ul.append(li);
}
ul.addClass('rslides');
ul.attr("id", "mySlides");
jQuery("#mySlides").replaceWith(ul);
jQuery("#mySlides").responsiveSlides({timeout: 12000, auto: true, nav: true, navContainer: "#serviceCarouselLabel",
prevText: "", nextText: "", manualControls: '.rxa'
});
}
//rotateImages.js
// JavaScript Document to rotate images
// all images with class rotateThisImage will be rotated. they can and should be grouped with an attribute of rgroup
/* var rotationGroups = new Array();
Event.observe(window, 'load',function(){
try{
var a = $$('.rotateThisImage');
a.each(function(o){
o.hide();
i = getRotationGroup( o );
if( !isArray( rotationGroups[i] ) ){
rotationGroups[i] = new Array();
}
rotationGroups[i].push( o );
});
rotationGroups.each(function(o){
oo = o[0];
oo.show();
setTimeout( "rotateImages( "+getRotationGroup( oo )+",0,1)" , 10000 );
});
}catch(err){
}
});*/
function rotateImages( i, c, n ){
a = rotationGroups[i];
change( a[c],a[n] );
c = n;
n = n + 1;
if( n > a.length-1 ){
n = 0;
}
setTimeout( "rotateImages( "+i+","+c+","+n+");" , 10000 )
}
function change( i, o ){
new Effect.Fade(i, { duration:2});
new Effect.Appear(o, { duration:2});
}
function getRotationGroup( o ){
var i = o.readAttribute("rgroup");
if( i == null ){
i = 0;
}
return i;
}
function isArray(testObject) {
return testObject && !(testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number';
}
//base64.js
// JavaScript Document
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
encode : function (input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = Base64._utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
}
return output;
},
// public method for decoding
decode : function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;
},
// private method for UTF-8 encoding
_utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
//validate_form.js
// Similar to validate form used at innovectra
// Both inherited from RPI
var validationRules = new Array();
function vRule( formField, labelID, ruleParserName , aNull ){
this.formField = formField;
this.labelID = labelID;
this.ruleParserName = ruleParserName;
this.allowNull = aNull;
this.passed = false;
this.validate = vr_validate;
this.validationFailureMessage = vr_validationFailureMessage;
this.displayVisual = vr_displayVisual;
this.vfmsg = "";
this.oldClassName = "";
}
function vr_displayVisual(problem){
var identity;
var f;
f = this.labelID;
identity=document.getElementById( f );
if (problem == true && isNull( identity ) == false ) {
this.oldClassName = identity.className;
identity.className='validate_inputProblem';
}else{
if(this.oldClassName !="" ){
identity.className=this.oldClassName ;
}
}
}
function vr_getFieldValue( formField ){
var v ;
if( formField.type == "checkbox" ){
v = formField.checked ;
}else if( typeof formField.val == 'function' ){
v = formField.val() ;
}else if( typeof tinyMCE !== 'undefined' && tinyMCE.get(formField.id) ){
v = tinyMCE.get(formField.id).getContent() ;
}else{
v = trim( formField.value );
}
return v;
}
function vr_validate(){
var r = true;
var v = vr_getFieldValue(this.formField) ;
this.vfmsg = ""
if( this.allowNull == true && v == '' ){
r = true;
}else if( this.allowNull == false && v == '' ){
r = false;
this.vfmsg = "Must be not be empty "
}else{
switch(this.ruleParserName){
case 'money':
if( !IsNumeric( v) ){
r = false;
this.vfmsg = "Must be formated as money (XX.XX) "
}
break
case 'sqldate':
if( !matchEntireRegex( v, /[0-9]+\/[0-9]+\/[0-9]+/) ){
r = false;
this.vfmsg = "Must be formated (MM/DD/YYYY)"
}
break
case 'sqltime':
if( !matchEntireRegex( v, /[0-9]+:[0-9]+\s*[APap][Mm]/) ){
r = false;
this.vfmsg = "Must be formated (HH:MM PM)"
}
break
case 'sqldatetime':
if( !matchEntireRegex( v, /[0-9]+\/[0-9]+\/[0-9].\s[0-9]+:[0-9]+\s*[APap][Mm]/) ){
r = false;
this.vfmsg = "Must be formated (YYYY/MM/DD HH:MM PM)"
}
break
case 'numeric':
if( !IsNumeric( v ) ){
r = false;
this.vfmsg = "Must be a number"
}
break
case 'integer':
if( hasInvalidChars( v, "0123456789" ) ){
r = false
this.vfmsg = "Must be an Integer"
}
break
case 'notnull':
if( v == "" ){
r = false
this.vfmsg = "Cannot be empty"
}
break
case 'email':
if(!validateEmail(v)){
r = 0;
this.vfmsg = "Invalid email address";
}
break;
case 'zipcode':
if(!isValidZip(v)){
r = 0;
this.vfmsg = "Invalid Zip Code";
}
break;
case 'phone':
if(!isValidPhone(v)){
r = 0;
this.vfmsg = "Invalid phone number";
}
break;
default:
}
}
this.passed = r;
return r;
}
function vr_validationFailureMessage(){
return this.vfmsg ;
}
function addValidationRule( formField, labelID, ruleParserName, aNull ){
var r
r = new vRule( formField, labelID, ruleParserName , aNull );
validationRules.push(r);
}
function validateForm(){
var passed = true
//for (i in validationRules ){
for (var i = 0; i < validationRules.length; i++) {
if( !validationRules[i].validate() ){
passed = false;
}
}
if ( passed == false){
var r
r = "Please enter required values.\n\n"
//for (i in validationRules ){
for (var i = 0; i < validationRules.length; i++) {
if( validationRules[i].passed == false ){
r = r + "\n" + readLayer( validationRules[i].labelID ) + " : " + validationRules[i].validationFailureMessage();
validationRules[i].displayVisual(true)
}else{
validationRules[i].displayVisual(false)
}
}
alert(r);
}
return passed;
}
function vfr_Required( formField, labelID ){
if( formField.value != "" ){
return true;
}else{
return false;
}
}
function IsNumeric(sText){
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++){
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1){
IsNumber = false;
}
}
return IsNumber;
}
function trim(str){
return str.replace(/^\s*|\s*$/g,"");
}
function matchEntireRegex( matchString, myRe ){
myArray = myRe.exec(matchString);
if ( typeof myArray == 'object' && myArray ) {
if( myArray[0] == matchString ){
return true;
}else{
return false;
}
}else{
return false;
}
}
function hasInvalidChars( searchSet, allowedChar ){
var charpos = searchSet.search( "[^"+allowedChar+"]" );
if(searchSet.length > 0 && charpos >= 0) {
return true;
}
return false
}
function preventCharacter( searchSet, disallowedChar ){
var charpos = searchSet.search( "["+disallowedChar+"]" );
if(searchSet.length > 0 && charpos >= 0) {
return true;
}
return false
}
function isNull(a){
return typeof a == 'object' && !a;
}
function readLayer(ID,parentID) {
if (document.layers) {
var oLayer;
if(parentID){
oLayer = eval('document.' + parentID + '.document.' + ID + '.document');
}else{
oLayer = document.layers[ID].document;
}
oLayer.open();
sText = oLayer.read();
oLayer.close();
} else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape") {
sText = document.getElementById(ID).innerHTML;
}else if (document.all){
sText = document.all[ID].innerHTML ;
}
return sText;
}
function validateEmail(emails){
// a very simple email validation checking. you can add more complex email checking if it helps
if(emails.length <= 0){
return true;
}
var result = true;
var a = emails.split(";");
for (i = 0; i < a.length; i++) {
var email = a[i];
email = email.trim();
if(email.length <= 0){
continue;
}
var splitted = email.match("^(.+)@(.+)$");
if(splitted == null){
result = false;
continue;
}
if(splitted[1] != null ){
var regexp_user=/^\"?[\w-_\.]*\"?$/;
if(splitted[1].match(regexp_user) == null){
result =false;
continue;
}
}
if(splitted[2] != null){
var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
if(splitted[2].match(regexp_domain) == null)
{
var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
if(splitted[2].match(regexp_ip) == null){
result=false;
continue;
}
}
}
}
return result;
}
function matchEntireRegex( matchString, myRe ){
myArray = myRe.exec(matchString);
if ( typeof myArray == 'object' && myArray ) {
if( myArray[0] == matchString ){
return true;
}else{
return false;
}
}else{
return false;
}
}
function hasInvalidChars( searchSet, allowedChar ){
var charpos = searchSet.search( "[^"+allowedChar+"]" );
if(searchSet.length > 0 && charpos >= 0) {
return true;
}
return false;
}
function preventCharacter( searchSet, disallowedChar ){
var charpos = searchSet.search( "["+disallowedChar+"]" );
if(searchSet.length > 0 && charpos >= 0) {
return true;
}
return false;
}
function isNull(a){
return typeof a == 'object' && !a;
}
function isValidPhone(cleanPhone){
var result;
//no letters
if( cleanPhone.match( /[a-zA-Z]/)){
return false;
}
cleanPhone = trim( cleanPhone.replace( "DNC","") );
cleanPhone = cleanPhone.replace(/[^0-9]/g, "");
if(cleanPhone.length > 0){
if(cleanPhone.length == 7 && IsNumeric(cleanPhone)){
result = true;
}else if(cleanPhone.length == 10 && IsNumeric(cleanPhone)){
result = true;
}else if( cleanPhone.slice(0,1) == "1" && cleanPhone.length == 11 && IsNumeric(cleanPhone)){
result = true;
}else{
result = false;
}
}else{
result = true;
}
return result;
}
function isValidZip(zipCode){
zipCode = trim( zipCode );
if(zipCode.length >=5 ){
return true;
}else if(zipCode.length == 0 ){
return true;
}else{
return false;
}
}
//coupon.js
var couponDialog = null;
//var ccID = 0;
function showFullCoupon( couponID ){
logAction( 4, "show" );
scroll(0,0);
//couponAttachPoint
var request = jQuery.ajax({
type: "GET",
url: '/index.php?method=jsDataRequest&dataBlock=couponText',
dataType: 'xml'
});
request.success(function( msg ) {
var html = jQuery(msg).find('message')[0].innerHTML;
//Hack for Safaris lack of innerHTML support
if( html == undefined ){
html = jQuery( jQuery(msg).find('message') );
}
html = jQuery("").html(html).text();
jQuery('#couponAttachPoint').html(html);
jQuery("#couponDialog").attr("title","Coupon");
couponDialog = jQuery( "#couponDialog" ).dialog( { autoOpen:false , draggable: false , dialogClass: "couponPopupDialog", width:500,
position: { my: "top", at: "top", of: window }
} );
jQuery("#couponDialog").dialog( "open" );
});
request.fail(function( jqXHR, textStatus ) {
});
}
function hideFullCoupon(){
logAction( 4, "hide" );
}
function printCoupon( ccID ){
logAction( 4, "print" );
window.print();
}
function emailCoupon( ccID ){
//logAction( 4, "print" );
}
//onload.js
/*
* Copyright 2014 - Jay McGlothlin
*/
jQuery( document ).ready(function() {
attachEmailForm('#emailFormAttachPoint');
//coupon_buildHTML('#attachPoint' );
});
//email.js
// JavaScript Document
function emailFormField(p1,p2,type,extra){
this.label=p1;
this.name=p2;
this.type=type;
this.extra=extra;
}
function showEmailForm(){
try{
logAction( 5, "show" );
}catch(e){}
//jQuery('#emailCurtain').className = "visible";
//jQuery('#curtainBackground').className = "visible";
scroll(0,0);
jQuery("#name").val( "" )
jQuery("#email").val( "" )
jQuery("#phone").val( "" )
jQuery("#message").val( "" )
jQuery("#email").removeClass("formWarn");
jQuery("#phone").removeClass("formWarn");
jQuery("#emailForm").removeClass('greyOutForm');
jQuery("#SendEmail").attr('disabled',false);
jQuery("#form_err").hide() ;
jQuery("#form_spinner").hide() ;
//emailFormDialog.open();
jQuery("#dialog").dialog( "open" )
}
function hideEmailForm(){
try{
logAction( 5, "hide" );
}catch(e){}
//jQuery('#emailCurtain').className = "hidden";
//jQuery('#curtainBackground').className = "hidden";
//emailFormDialog.close();
jQuery("#dialog").dialog( "close" )
}
function submitEmailForm( formID ){
//special check
var email = jQuery("#email").val() ;
var phone = jQuery("#phone").val() ;
var v = new vRule( jQuery("#phone") , "phone_lbl", "phone" , true );
validPhone = v.validate() ;
if( phone == "" ){
validPhone = false;
}
v = new vRule( jQuery("#email") , "email_lbl", "email" , true );
validEmail= v.validate() ;
if( validEmail == false && email != "" ){
jQuery("#form_err").show() ;
jQuery("#form_err_lbl").html("Please enter a valid email address, or nothing.") ;
return false;
}
if( email == "" ){
validEmail = false;
}
if ( email == "" && phone == "" ){
//alert("Please enter either phone number or email address.");
jQuery("#form_err").show() ;
jQuery("#form_err_lbl").html( "Please enter either a phone number or email address.") ;
return false;
}
if ( validPhone == true || validEmail == true ){
if( validateForm() ) {
//submit form request
jQuery.post( "index.php?method=sendemail", jQuery( formID ).serialize() , function( data ) {
if( data.getElementsByTagName('message')[0].firstChild.data=='1' ){
hideEmailForm();
}
} , 'xml' );
//Disable button,
jQuery("#SendEmail").attr('disabled',true);
jQuery("#emailForm").addClass('greyOutForm');
jQuery("#form_spinner").show() ;
}
}else{
jQuery("#form_err").show() ;
jQuery("#form_err_lbl").html( "Please enter either a valid phone number or valid email address." ) ;
return false;
}
return false; //kills form submission
}
/*function submitEmailFormPostback(o){
xmlhttp = o.getXMLHttpRequestObject()
var message = xmlhttp.responseXML.getElementsByTagName('message')[0].firstChild.data
if( message == 1 ){
hideEmailForm();
}else{
}
}*/
function attachEmailForm( targetDiv ){
var mainDiv = jQuery("
");
mainDiv.attr( "id", "emailDialog" );
var innerFormDiv = jQuery("