// adestefa@us.ibm.com 5/23/2005 1:42PM
// create contact module using 3 styles
//
// 1 - call me
// 2 - call/chat
// 3 - call/chat/raq
// 4 - call/raq
function psContactModule(style,callvdn,chatvdn,callnavcode,chatnavcode,raqURL){
var table  = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="//www.ibm.com/i/c.gif" width="1" height="6" alt="" /></td></tr>';
var spacer = '<tr><td><img src="//www.ibm.com/i/c.gif" width="1" height="5" alt="" /></td></tr>';
var url  = "void(window.open('https://sales.liveperson.net/hc/3815120/?cmd=file&file=visitorWantsToChat&site=3815120"
var srcURL   = "&callUsSrcPage=" + escape(location.protocol+'//'+window.location.hostname+window.location.pathname);
var srcTitle = "&uui_data=" + escape(document.title.replace(/\+/g,' '));
var call = url + "vdn_ext=" + callvdn + srcURL + srcTitle + "&navCode=" + callnavcode + "&type=callback&arena=ibm','callmeWindow','height=506,width=382,scrollbars=no'))";
var chat = url + "vdn_ext=" + chatvdn + srcURL + srcTitle + "&navCode=" + chatnavcode + "&type=chatter&arena=ibm','callmeWindow','height=506,width=382,scrollbars=no'))";
var mod = table;
// call me
if(style == 1 || style == 2 || style == 3 || style == 4){
mod += '<tr><td><img src="//www.ibm.com/i/v14/buttons/phone_rd.gif" height="21" alt="" border="0" /></td>';
mod += '<td>&nbsp\;</td><td><a class="fbox" href="javascript:'+call+'" onclick="'+call+'" onkeypress="'+call+'"><b>Call me</b></a></td></tr>';
mod += spacer;
}
// chat
if(style == 2 || style == 3){
mod += '<tr><td><img src="//www.ibm.com/i/v14/buttons/chat_rd.gif" height="21" alt="" border="0" /></td></a></td>';
mod += '<td>&nbsp\;</td><td><a class="fbox" href="javascript:'+chat+'" onclick="'+chat+'" onkeypress="'+chat+'"><b>Chat online</b></a></td></tr>';
mod += spacer;
}
// raq link
if(style == 3 || style ==4){
mod += '<tr><td><img border="0" height="21" src="//www.ibm.com/i/v14/buttons/arrow_rd.gif" width="21" alt=""/></td>';
mod += '<td>&nbsp\;</td><td><a class="fbox" href="'+raqURL+'"><b>Request a quote</b></a></td></tr>';
mod += spacer;
}
mod += "</table>";
document.write(mod);
}

