//Contents for menu 1
var Settings=new Array()
Settings[0]='<a href="application_look_and_feel.cfm">Application Look & Feel</a>'
Settings[1]='<a href="email_parameters.cfm">E-Mail Parameters</a>'
Settings[2]='<a href="data_validation.cfm">Data Validation</a>'
Settings[3]='<a href="overview_screen_queries.cfm">Overview Screen Queries</a>'
Settings[4]='<a href="custom_messages.cfm">Custom Messages</a>'
Settings[5]='<a href="system_companies.cfm">System Companies</a>'
Settings[6]='<a href="domain_names.cfm">Domain Names</a>'

//Contents for menu 2, and so on
var Clients=new Array()
Clients[0]='<a href="add_client.cfm">Add Client</a>'
Clients[1]='<a href="edit_clients.cfm">Edit Clients</a>'
Clients[2]='<a href="edit_client_scrub_restrictions.cfm">Client Scrub Restrictions</a>'

//Contents for menu 3, and so on
var Offers=new Array()
Offers[0]='<a href="add_offer.cfm">Add Offer</a>'
Offers[1]='<a href="edit_offers.cfm">Manage Offers</a>'
Offers[2]='<a href="edit_categories.cfm">Manage Categories</a>'
Offers[3]='<a href="test_offers.cfm">Test Offers</a>'
Offers[4]='<a href="dv_email_offers.cfm">DegreeVenue E-Mail Offers</a>'
Offers[5]='<a href="themes.cfm">Themes</a>'

var Survey_Admin=new Array()
Survey_Admin[0]='<a href="edit_survey_questions.cfm">Manage Survey Questions</a>'
Survey_Admin[1]='<a href="edit_surveys.cfm">Manage Surveys</a>'
Survey_Admin[2]='<a href="edit_external_surveys.cfm">Manage External Survey Links</a>'
Survey_Admin[3]='<a href="manage_platinum_survey_links.cfm">Manage Platinum Survey Links</a>'
Survey_Admin[4]='<a href="manage_work_at_home_links.cfm">Manage Work at Home Links</a>'
Survey_Admin[5]='<a href="edit_external_api_surveys.cfm">View External API Surveys</a>'
Survey_Admin[6]='<a href="edit_survey_featured_offers.cfm">Manage Survey Featured Offers</a>'
Survey_Admin[7]='<a href="edit_polls.cfm">Manage Polls</a>'
Survey_Admin[8]='<a href="edit_auto_post_xlink.cfm">Manage Auto Post Offers</a>'
Survey_Admin[9]='<a href="manage_campaigns.cfm">Manage Campaigns</a>'
Survey_Admin[10]='<a href="data_upload_tool.cfm">Data Upload Tool</a>'

var Affiliates=new Array()
Affiliates[0]='<a href="add_affiliate.cfm">Add Affiliate</a>'
Affiliates[1]='<a href="edit_affiliates.cfm">Edit Affiliates</a>'
Affiliates[2]='<a href="add_affiliate_revshare_pixel.cfm">Add Affiliate RevShare Pixel</a>'
Affiliates[3]='<a href="manage_affiliate_revshare_pixels.cfm">Manage Affiliate RevShare Pixels</a>'
Affiliates[4]='<a href="add_affiliate_registration_pixel.cfm">Add Affiliate Registration Pixel</a>'
Affiliates[5]='<a href="manage_affiliate_registration_pixels.cfm">Manage Affiliate Registration Pixels</a>'
Affiliates[6]='<a href="affiliate_media_link_restrictions.cfm">Affiliate Media Link Restrictions</a>'

var Reporting=new Array()
Reporting[0]='<a href="affiliate_report.cfm">Affiliate Reports</a>'
Reporting[1]='<a href="offer_reports.cfm">Offer Reports</a>'
Reporting[2]='<a href="supression_list.cfm">Supression List</a>'
Reporting[3]='<a href="export_lists.cfm">Export Lists</a>'
Reporting[4]='<a href="record_search.cfm">Record Search</a>'
Reporting[5]='<a href="load_data_file.cfm">Load Data File</a>'
Reporting[6]='<a href="repost_posted_leads.cfm">Flag Posted Leads</a>'
Reporting[7]='<a href="repost_failed_leads.cfm">Repost Failed Leads</a>'
Reporting[8]='<a href="retrieve_test_strings.cfm">Retreive Test Strings</a>'
Reporting[9]='<a href="scrub_leads.cfm">Scrub Leads</a>'
Reporting[10]='<a href="manage_pending_client_scrubs.cfm">Manage Pending Client Scrubs</a>'
Reporting[11]='<a href="media_links.cfm">Media Links</a>'
Reporting[12]='<a href="media_link_reporting.cfm">Media Link Reporting</a>'
Reporting[13]='<a href="survey_reporting_offers__no_impressions.cfm">Survey Signups & Offers</a>'
Reporting[14]='<a href="autoresponder_reporting.cfm">Survey Autoresponder Activity</a>'
Reporting[15]='<a href="survey_media_links.cfm">Survey Media Link Activity</a>'
Reporting[16]='<a href="program_inventory_report.cfm">Program Inventory Report</a>'
Reporting[17]='<a href="dv_email_reporting.cfm">DV E-Mail Media Links</a>'
Reporting[18]='<a href="schools_report.cfm">Schools Report</a>'
Reporting[19]='<a href="third_party_posting_stats_report.php">3rd Party Posting Stats</a>'
Reporting[20]='<a href="dl_zero_results.cfm">DegreeLocator Zero Results</a>'

var AutoResponders_Admin=new Array()
AutoResponders_Admin[0]='<a href="manage_autoresponders.cfm">Manage Autoresponders</a>'
AutoResponders_Admin[1]='<a href="requeue_autoresponders.cfm">Requeue Autoresponders</a>'

var menuwidth='200px' //default menu width
var menubgcolor='white'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

