function ReminderObj()
{
var func = window.onresize;
window.onresize = function() {
if (func) func();
adjustWin(true);
return;
};
var reminderdiv = (document.getElementById("reminderDiv")==null ? document.createElement("DIV") : document.getElementById("reminderDiv"));
reminderdiv.id = "reminderDiv";
reminderdiv.className = "menu";
reminderdiv.style.zIndex = 5;
reminderdiv.style.visibility = "hidden";
document.body.appendChild(reminderdiv);
var remindermenu = new xMenu1('', 'reminderDiv', '');
var reminderbackdiv = (document.getElementById("reminderBackDiv")==null ? document.createElement("DIV") : document.getElementById("reminderBackDiv"));
reminderbackdiv.id = "reminderBackDiv";
reminderbackdiv.className = "menu";
reminderbackdiv.style.zIndex = 4;
reminderbackdiv.style.visibility = "hidden";
reminderbackdiv.style.backgroundColor = "#000000";
if(window.ActiveXObject)
{
reminderbackdiv.style.filter="alpha(opacity=\"70\")";
}
else
{
reminderbackdiv.style.opacity=0.6;
}
document.body.appendChild(reminderbackdiv);
var reminderbackmenu = new xMenu1('', 'reminderBackDiv', '');
this.ShowLinkSpotPopup = showLinkSpotPopup;
this.ShowPopupSpot = showPopupSpot;
this.ShowNearbySpots = showNearbySpots;
this.ShowDailyView = showDailyView;
this.ShowWelcome = showWelcome;
this.ShowPrivateTripSpots = showPrivateTripSpots;
this.MessageBox = messageBox;
this.ShowSpotEdit = showSpotEdit;
this.onClose = onclose;
this.ShowLightBox = showLightBox;
this.SetReload = function()
{
isReload = "Y";
}
var isReload = "N";
var exec = null;
var doc = null;
var trigger
var displace;
function onclose(exe)
{
if (exe!=null) exec = exe;
var obj = null;
if (doc) obj = xGetElementById(doc + "_check");
if (obj!=null)
{
if (xGetElementById(doc + "_check").checked)
{
var reminders = getCookie('reminders');
if (reminders.indexOf(doc)==-1)
{
setCookie('reminders', reminders + "," + doc);
}
}
}
else
{
obj = xGetElementById("popupspot_iframe");
if (obj!=null)
{
obj.src="about:blank";
}
}
reminderbackmenu.onClose();
remindermenu.onClose();
if (exec!=null)
{
eval(exec);
exec = null;
}
else
{
if (isReload=="Y")
{
if (g_did && last_eid) //from dailyview
{
window.location.href = "/dailyview.jsp?did=" + g_did + "&eid=" + last_eid;
return;
}
window.location.href = window.location.href;
}
}
}
function adjustWin(isWinResize)
{
if (!reminderbackmenu.isOpen() && isWinResize) return;
var width = xWidth(xGetElementById("reminder_tb001"));
var height = xHeight(xGetElementById("reminder_tb001"));
reminderbackmenu.onOpen(xClientWidth(), xClientHeight(), trigger, displace);
remindermenu.onOpen(width, height, trigger, displace);
}
function messageBox(msg, exe)
{
exec = exe;
var htmlarray = new Array();
htmlarray.push('<div style="border:2px solid #57B6DD; padding:10px; width:250px;">');
htmlarray.push('<div class="required_field" style="padding-bottom:2px;text-align:right;"> <a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" align="absmiddle" width="13" height="13"></a>&nbsp;<a href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<div class="terms">');
htmlarray.push(msg);
htmlarray.push('</div>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showLightBox(on)
{
if (on)
{
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
else
{
reObj.onClose();
}
}
function showLinkSpotPopup(triggerobj, disp, exe)
{
doc = "linkspotreminder";
exec = exe;
if (redirectCheck()) return;
var htmlarray = new Array();
htmlarray.push('<div style="border:2px solid #57B6DD; padding:10px; width:250px;">');
htmlarray.push('<div class="required_field" style="padding-bottom:2px;text-align:right;"> <a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" align="absmiddle" width="13" height="13"></a>&nbsp;<a href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<div class="h2_g"><img src="/images/icons/lightbulb.png" align="absmiddle" width="16" height="16"> Reminder</div>');
htmlarray.push('<div class="terms">This spot belongs to others. It is read only.</div>');
htmlarray.push('<div class="terms" style="padding-top:5px;">Otineri encourages you to copy this spot and add your experience after your visit.</div>');
htmlarray.push('<div class="required_field" style="padding-top:10px;"><input type="checkbox" id="linkspotreminder_check" checked> <a href="javascript:void(0);" onclick="xGetElementById(\'linkspotreminder_check\').checked = !xGetElementById(\'linkspotreminder_check\').checked;">Do not show this message again.</a></div>');
htmlarray.push('</div>');
remindermenu.onClose();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = triggerobj;
displace = disp;
adjustWin();
}
function showPopupSpot(guid, exe)
{
var htmlarray = new Array();
var w = xClientWidth() - 100;
var h = xClientHeight() - 70;
w = 800;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#57B6DD; padding:8px; text-align:right;">');
if (exe!=null) htmlarray.push('<a class="photo" href="javascript:reObj.onClose(\'' + exe.replace(/\'/g, "\\'") + '\');"><img class="noborder" src="/images/icons/image_link.png" style="background-color:#57B6DD;" align="absmiddle" width="16" height="16"></a>&nbsp;<a class="white" href="javascript:reObj.onClose(\'' + exe.replace(/\'/g, "\\'") + '\');">Add to schedule</a> | ');
htmlarray.push('<a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" style="background-color:#ffffff;" align="absmiddle" width="13" height="13"></a>&nbsp;<a class="white" href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="popupspot_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="popupspot_iframe" src="/com/popupspotview.jsp?sid=' + guid + '" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'popupspot_wait\'); var fr=xGetElementById(\'popupspot_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showSpotEdit(param)
{
var htmlarray = new Array();
var w = xClientWidth() - 100;
var h = xClientHeight() - 70;
w = 920;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#57B6DD; padding:8px; text-align:right;">');
htmlarray.push('<a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" style="background-color:#ffffff;" align="absmiddle" width="13" height="13"></a>&nbsp;<a class="white" href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="popupspot_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="popupspot_iframe" src="/spotedit.jsp?' + param + '" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'popupspot_wait\'); var fr=xGetElementById(\'popupspot_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showNearbySpots(guid, link_str, mask)
{
var htmlarray = new Array();
var w = xClientWidth() - 30;
var h = xClientHeight() - 50;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#a9c2bd; padding:8px; text-align:right;">');
htmlarray.push('<a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" style="background-color:#ffffff;" align="absmiddle" width="13" height="13"></a>&nbsp;<a class="white" href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="popupspot_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="popupspot_iframe" src="/spotsmap.jsp?sid=' + guid + (link_str==null ? '' : '&' + link_str) + (mask==null ? '' : '&cat_id_mask=' + mask) + '" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'popupspot_wait\'); var fr=xGetElementById(\'popupspot_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showPrivateTripSpots(trip_guid)
{
var htmlarray = new Array();
var w = 600;
var h = xClientHeight() - 50;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#a9c2bd; padding:8px; text-align:right;">');
htmlarray.push('&nbsp;</div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="popupspot_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="popupspot_iframe" src="/privatetripspotslist.jsp?tid=' + trip_guid + '" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'popupspot_wait\'); var fr=xGetElementById(\'popupspot_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showDailyView(guid, link_str)
{
var htmlarray = new Array();
var w = xClientWidth() - 30;
var h = xClientHeight() - 50;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#a9c2bd; padding:8px; text-align:right;">');
htmlarray.push('<a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" style="background-color:#ffffff;" align="absmiddle" width="13" height="13"></a>&nbsp;<a class="white" href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="popupspot_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="popupspot_iframe" src="/dailyview.jsp?did=' + guid + '&' + (link_str==null ? '' : link_str) + '" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'popupspot_wait\'); var fr=xGetElementById(\'popupspot_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function showWelcome()
{
var htmlarray = new Array();
var w = 680;//xClientWidth() - 30;
var h = 400;//xClientHeight() - 50;
htmlarray.push('<div style="padding-bottom:10px; width:' + w + 'px; height:' + h + 'px;">');
htmlarray.push('<div class="required_field" style="background-color:#a9c2bd; padding:8px; text-align:right;">');
htmlarray.push('<a class="photo" href="javascript:reObj.onClose();"><img class="noborder" src="/images/icons/close.png" style="background-color:#ffffff;" align="absmiddle" width="13" height="13"></a>&nbsp;<a class="white" href="javascript:reObj.onClose();">Close</a></div>');
htmlarray.push('<table width="100%" height="100%" border="0" id="welcome_wait"><tr><td align="center" valign="middle"><span class="terms">LOADING...</span></td></tr></table>');
htmlarray.push('<iframe id="welcome_iframe" src="/welcome.jsp" frameborder="0" style="border:none;display:none;" onload="var tb=xGetElementById(\'welcome_wait\'); var fr=xGetElementById(\'welcome_iframe\'); tb.style.display=\'block\'; fr.style.display=\'none\'; if (fr.src==\'about:blank\') return; fr.style.width=xWidth(tb); fr.style.height=eval(' + h + '-25); tb.style.display=\'none\'; fr.style.display=\'block\';"></iframe>');
htmlarray.push('</div>');
remindermenu.onClose();
remindermenu.setSticky2();
reminderbackmenu.setSticky2();
xGetElementById("reminderDiv").innerHTML = "<table id='reminder_tb001' border='0'><tr><td>" + htmlarray.join("") + "</td></tr></table>";
trigger = null;
displace = 6;
adjustWin();
reminderbackmenu.onScroll2();
remindermenu.onScroll2();
}
function onScroll()
{
moveTo(((xClientWidth() - xWidth(mnu))/2), xScrollTop());
}
function redirectCheck()
{
if ((g_trigger_obj!=null && g_trigger_obj.id!="linkspot")
|| (getCookie('reminders').indexOf(doc)!=-1))
{
if (exec!=null) eval(exec);
exec = null;
return true;
}
return false;
}
}