//var menu1=new Array()
//menu1[0]='<b>brandname</b>'
//menu1[1]='<p>tourname</p>'
//menu1[2]='<a href="javascript:popMoreWindow(payload)">Go to supplier website</a>'
//menu1[3]='<a href="/callsupplier?product=productid">Phone supplier</a>'
//menu1[4]='<a href="/emailsupplier?product=productid">Email enquiry to supplier</a>'
//menu1[5]='<a href="/contactagent?product=productid">Contact a fully accredited agent</a>'

 var menu1='';
 var menuC='';
 var menuE='';
 var menuW='';

 menu1 = menu1 + '<div id="dropmenuhead"><p><img src="/i/l/brandid.gif" alt="brandname" /></p>'
 menu1 = menu1 + '<p><b>tourname</b></p></div>'
 menuW = '<p><a href="javascript:popMoreWindow(payload)"><b>> Visit brandname website</b></a><br />Get latest tour, pricing and destination information from the supplier about this tour.</p>'
 menuC = '<p><a href="javascript:popSupplierContacts(payload)"><b>> brandname phone contacts</b></a><br />Got a quick question?<br />Ask the suppliers reservation staff.</p>'
 menuE = '<p><a href="javascript:popEmailSupplier(payload)"><b>> Email brandname</b></a><br />If you don\'t have time, email the supplier.<br />They will email or phone you back.</p>'
// menu1 = menu1 + '<a href="javascript:popAgentQuote(payload)"><b>> Get quote from Travel Agent</b></a><br />Let the agent do the hard work<p></p>'

var disappeardelay=750  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)

var cvv='';
 cvv = cvv + '<h3>Card Security Number</h3><br /><img src="/i/m/cvv.jpg" alt="" /><br />Visa/Master Card: A 3-digit number in reverse italics on the back of your credit card<br />American Express Card: A 4-digit number on the front, just above your credit card number'

var joinfee='';
 joinfee = joinfee + '<h3>Joining Tourabout</h3><p><p>Tourabout is unique in its\' approach to travel distribution. Where other sites and systems provide rudimentary directory listings or simple searches the Qualifying Engine by Tourabout breaks down your travel products to index specific details.  This allows a better Qualifying of thousands of products and displays results according to an accurate relevancy algorithm.</p>'
 joinfee = joinfee + '<p>This unique system is complex to build and requires consistent maintenance of your content as upgrades to the technology are developed and deployed. This fee covers the network license, the ongoing content maintenance and your immediate access to upgrades made to the system over the year without Tourabout having to cost new components each time they are deployed.</p>'
 joinfee = joinfee + '<p>In short you get a better system that improves faster for one low annual fee.</p>'

var commoncents='';
 commoncents = commoncents + '<h3>Common Cents Policy</h3><p>On the Tourabout network if the same customer returns within 30 days and accesses one of your products in the same region we charge you less.</p>'
 commoncents = commoncents + '<p>We figure you shouldn\'t have to pay full price for the same customer over and over</p><p>It\'s just another way we deliver value to our partners.</p>'

var logospec='';
 logospec = logospec + '<h3>Logo Guidelines</h3><p>Logos should be saved in a .gif format with a file size no larger than 5kb.'
 logospec = logospec + '<h4>Landscape Logos</h4><p>Should be no bigger than 100 pixels wide by 40 high.</p><img src="/i/hlplandlogo.gif" /><br />'
 logospec = logospec + '<h4>Portrait Logos</h4><p>Should be no bigger than 55 pixels wide by 70 high.</p><img src="/i/hlpportlogo.gif" /><br />'
 logospec = logospec + '<p>If you need help please contact a team member with a help desk request.</p>'

var hlpusp='';
 hlpusp = hlpusp + '<h3>Your USP</h3><p>The USP descriptions you see on the site are just another unique way Tourabout provides operators ways to communicate '
 hlpusp = hlpusp + 'the most important things about your company and your products.</p>'
 hlpusp = hlpusp + '<p>To see it working just enter what makes your company special in the box provided and click save. We\'ll do the rest.</p><img src="/i/m/hlpUSP.gif" alt="">'

var hlpproduct='';
 hlpproduct = hlpproduct + '<img src="/i/m/hlpProduct.gif" alt="">'

var hlpprice='';
 hlpprice = hlpprice + '<img src="/i/m/hlpPrice.gif" alt="">'

var qualclick='';
 qualclick = qualclick + '<h3>Qualified Clicks,<br />Users matched to a product.</h3><hr class="hr1"><p>A <b>Qualified click</b> is where <b>a user</b> has viewed a specific product and clicks on the '
 qualclick = qualclick + 'Visit Supplier website link on Tourabout and <b>is transferred to your website</b>.</p>'
 qualclick = qualclick + '<p>You control where and who your products are shown to and where that user lands on your site from your Supplier Management Console.</p>'
 
var quallead='';
 quallead = quallead + '<h3>Qualified Enquiry,<br />Users enquiring on your product.</h3><hr class="hr1"><p>A <b>Qualified Enquiry</b> is where Tourabout has converted a user further along the purchasing path '
 quallead = quallead + 'and they are <b>requesting more information or availability</b> about a specific product.</p>'
 quallead = quallead + '<p>Tourabout provides an enquiry screen to capture information and <b>forwards the enquiry</b> or quote request <b>and the persons contact email address or phone</b> details to you.</p>'


/////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: 160px" 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
}
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" || 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-obj.offsetWidth < 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 menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
{
edgeoffset=edgeoffset-(dropmenuobj.contentmeasure-(dropmenuobj.y-topedge));
if (edgeoffset<0) 
edgeoffset=0;
//edgeoffset=dropmenuobj.y

}
}
}
return edgeoffset
}

function populatemenu(what,brandid,brandname,tourname,productid,payload,options){
if (ie4||ns6)
{
var menustring = what; //.join("");
if (options.indexOf("W")!=-1) 
  menustring = menustring + menuW;
if (options.indexOf("C")!=-1) 
  menustring = menustring + menuC;
if (options.indexOf("E")!=-1) 
  menustring = menustring + menuE;

menustring=menustring.replace(/brandname/g, brandname);
menustring=menustring.replace(/tourname/g, tourname);
menustring=menustring.replace(/productid/g, productid);
menustring=menustring.replace(/brandid/g, brandid);
menustring=menustring.replace(/payload/g, "'"+payload+"'");
dropmenuobj.innerHTML=menustring; 
}
}


function dropdownmenu(obj, e, menucontents, menuwidth, brandid, brandname, tourname,productid,payload,options){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()

clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents,brandid,brandname,tourname,productid,payload,options)

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")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"

//alert(dropmenuobj.x);
//alert(dropmenuobj.y);

//alert(clearbrowseredge(obj, "bottomedge"));

//alert(dropmenuobj.style.left);
//alert(dropmenuobj.style.top);
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}



function genericpop(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populategeneric(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")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}


function populategeneric(what){
if (ie4||ns6)
{
var menustring = what //.join("");
dropmenuobj.innerHTML=menustring; 
}
}






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)
}
