isIE = document.all ? true : false; isN4 = document.layers; isActive = false; var dragDropEnabled = false; function dragDropInit(e) { var event_obj = isIE ? event.srcElement : e.target; event_info_obj = document.getElementById('event_info_pop'); if (!event_info_obj) { return true; } offsetx = isIE ? event.clientX : e.clientX; offsety = isIE ? event.clientY : e.clientY; nowX = parseInt(event_info_obj.style.left); nowY = parseInt(event_info_obj.style.top); dragDropEnabled = true; return false; } function dragDropOnMouseMove (e) { if (!dragDropEnabled) { return; } event_info_obj.style.left = (isIE ? nowX + event.clientX - offsetx : nowX + e.clientX - offsetx) + 'px'; event_info_obj.style.top = (isIE ? nowY + event.clientY - offsety : nowY + e.clientY - offsety) + 'px'; return false; } PortalEvents.addListener('mouseMove', dragDropOnMouseMove); PortalEvents.addListener("mouseDown", dragDropInit); PortalEvents.addListener("mouseUp", function() { dragDropEnabled = false }); function reloadPage(init) { //reloads the window if Nav4 resized if (init == true) with (navigator) { if ((appName == "Netscape") && (parseInt(appVersion) == 4)) { document.MM_pgW = innerWidth; document.MM_pgH = innerHeight; onresize = reloadPage; } } else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) { location.reload(); } } reloadPage(true); function showHideDivs() { //v6.0 var i,p,v,obj,args=showHideDivs.arguments; for (i=0; i<(args.length-1); i+=2) { if ((obj=SYNACOR_findObj(args[i]))!=null) { v=args[i+1]; if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; } obj.display=v; } } } function request_info(id, anchor_id) { req = getXMLRequestObject(); url = '/local/eventdetails_xml.php?event_id='+id; if (!req) { alert('Outdated Browser Alert!\nPlease update your web browser to a newer version'); } req.open('GET', url, true); req.onreadystatechange = function() { if (req.readyState == 4) { var xml = req.responseXML; var div = document.getElementById("event_info_pop"); if (!div) { div = document.createElement('div'); div.id = "event_info_pop"; div.style.position = 'absolute'; div.style.backgroundColor = '#ffffff'; div.style.width = '350px'; div.style.border = '1px solid #4daa33'; div.style.padding = '5px'; //div.style.z-index = '1'; div.style.filter = 'progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135)'; document.getElementsByTagName('body').item(0).appendChild(div); } hide_id('event_info_pop'); var details = ''; details += ''; details += ''; details += ''; details += '
  EVENT DETAILS
'; details += ''; details += ''; details += '
'; details += '' + get_cdata(xml, 'name') + '

'; if ('' != get_cdata(xml, 'close_date')) { details += 'Start Date: ' + get_cdata(xml, 'open_date') + '
'; details += 'End Date: ' + get_cdata(xml, 'close_date') + '
'; } else { details += 'Event Date: ' + get_cdata(xml, 'open_date') + '
'; } if ('' != get_cdata(xml, 'hours')) { if (get_cdata(xml, 'hours').match(/^\s*\d\d*(:\d\d)?\s*\w\w\s*$/)) { details += 'Start Time: ' + get_cdata(xml, 'hours') + '
'; } else { details += 'Hours: ' + get_cdata(xml, 'hours') + '
'; } } details += '
'; if ('' != get_cdata(xml, 'event_description')) { details += 'Description:
' + get_cdata(xml, 'event_description') + '

'; } var attendance = get_cdata(xml, 'attendance'); var admission = get_cdata(xml, 'admission'); var ethnic = get_cdata(xml, 'ethnic'); var feature = get_cdata(xml, 'feature'); if (('' != admission) || (('' != attendance) && '0' != attendance) || ('' != ethnic) || ('' != feature)) { details += 'Additional Information:
'; if ('' != admission) { details += 'Admission: ' + admission + '
'; } if (('' != attendance) && '0' != attendance) { var att_plus = ''; if ('YES' == get_cdata(xml, 'attendance_plus')) { att_plus = '+'; } details += 'Attendance: ' + attendance + att_plus + '
'; } if ('' != ethnic) { details += 'Ethnic: ' + ethnic + '
'; } if ('' != feature) { details += 'Features: ' + feature + '
'; } details += '
'; } details += 'Location:
'; details += get_cdata(xml, 'location') + '
' + get_cdata(xml, 'address1') + ' ' + get_cdata(xml, 'address2') + '
' + get_cdata(xml, 'city') + ' ' + get_cdata(xml, 'state'); if ('0' != get_cdata(xml, 'zipcode')) { details += ', ' + get_cdata(xml, 'zipcode'); } details += '
'; var phone = get_cdata(xml, 'phone'); var phone2 = get_cdata(xml, 'phone2'); var fax = get_cdata(xml, 'fax'); if ('' != phone) { details += 'Phone: ' + phone + '
'; } if ('' != get_cdata(xml, 'fax')) { details += 'Fax: ' + fax + '
'; } details += '
'; div.innerHTML = details; var link_x = find_pos_x(document.getElementById(anchor_id)); var link_y = find_pos_y(document.getElementById(anchor_id)); var move_x = 0; if (link_x > 500 && screen.availWidth < 850) { move_x = -350; } var move_y = 0 if (link_y > 500) { move_y = -100; } SYNACOR_Snap(anchor_id, 'event_info_pop', move_x, move_y); div.style.display='block'; add_event_listener(window, 'resize', function() { SYNACOR_Snap(anchor_id, 'event_info_pop', 0, 0); }, false); } } req.send(null); return false; }