serverPicked = "dc_";
var custom_ad = true;
var magnetImage = new Image(116, 31);
magnetImage.src = "";
if(undefined===window.wt_sponsor_html) var wt_sponsor_html = '';
// 2014: adsense or default ad depending on if there are closings
var default_ad = 'Alert data from Weatherthreat.com';
//----------------------------------------------
function dc_createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
//----------------------------------------------
function dc_readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
//----------------------------------------------
function dc_eraseCookie(name) {
createCookie(name,"",-1);
}
//----------------------------------------------
function dc_decodeString(theString){
return theString;
} // END FUNCTION
//----------------------------------------------
function dc_closing(theData){
a = theData.split("~~");
this.closing_type_id = dc_decodeString(a[0]);
this.org_type_id = dc_decodeString(a[1]);
this.user_id = dc_decodeString(a[2]);
this.closing_short_details = dc_decodeString(a[3]);
this.closing_long_details = dc_decodeString(a[4]);
this.org_name = dc_decodeString(a[5].toUpperCase());
// if national weather service alert
//if(this.closing_type_id == 'weat') this.org_name = 'NWS WEATHER ALERT';
this.org_city = dc_decodeString(a[6].toUpperCase());
this.org_state = dc_decodeString(a[7]);
this.county = dc_decodeString(a[8]);
this.closing_description = dc_decodeString(a[9]);
this.org_type_description = dc_decodeString(a[10]);
this.closing_start_date = dc_decodeString(a[11]);
this.closing_end_date = dc_decodeString(a[12]);
this.closing_effective_day = dc_closingEffectiveDay(dc_decodeString(a[13]));
this.closing_entered_date = dc_decodeString(a[14]);
this.org_id = dc_decodeString(a[15]);
this.closing_id = dc_decodeString(a[16]);
return this;
} // END FUNCTION
//-----------------------------------------------------------------
function dc_closingEffectiveDay(theDay){
if(theDay == '1') return 'Sunday';
else if(theDay == '2') return 'Mon';
else if(theDay == '3') return 'Tue';
else if(theDay == '4') return 'Wed';
else if(theDay == '5') return 'Thu';
else if(theDay == '6') return 'Fri';
else if(theDay == '7') return 'Sat';
else return '';
} // END FUNCTION
//-----------------------------------------------------------------
function createTabs(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.getElementById('closingsWidget');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}
function loginContent(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.getElementById('closingsWidget_container');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}//end function
function signupContent(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.getElementById('closingsWidget_container');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}//end function
function infoContent(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.getElementById('closingsWidget_container');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}//end function
var fragment_tabs = createTabs('
Get your WeatherThreat account today and start posting closings for your organization!
'); //write coresponding fragment to closingsWidget_container document.getElementById("closingsWidget_container").appendChild(fragment); } if(tab_id == "info_tab") { var fragment = infoContent('Get all of the closings on your phone and notifications as well. Or submit your own closing right from your phone.