/* ########################################
GLOBAL ASSETS RELEASE v5.1.7
BUILD DATE: 20091022
COPYRIGHT SUN MICROSYSTEMS INC. 2009
CONTACT US AT http://www.sun.com/secure/contact/cer.jsp?id=1073e17d-8d6c-43f6-b7e8-cf210cc89ba9 WITH ANY QUESTIONS
######################################## */

function lpExpertParser(_7bb,_7bc,_7bd,_7be,_7bf){
this.objName=_7bb;
this.lpex_requestUrl="http://apis.liveperson.com/experts.svc/1.1/categories/CATEGORY/jsonp?sort=0&index=PAGE_NUMBER&count=NUM_EXPERTS&banner=22493&callback=OBJ_NAME.lpProcessExperts&bannerId=BANNER_ID";
this.lpex_currentPage=1;
this.lpex_currentTotal=0;
this.lpex_pageSize=_7bd;
this.lpex_parent=document.getElementById(_7be);
this.lpex_searchCategory=_7bc;
this.lpex_partnerid=_7bf;
this.lpex_createExpertCallback=null;
this.lpex_showNavigationUICallback=null;
this.lpex_loadStartCallback=null;
this.lpex_loadDoneCallback=null;
this.lpProcessExperts=function(_7c0){
if(typeof (_7c0)=="undefined"||_7c0==null||this.lpex_parent==null){
return;
}
var i=0;
try{
if(typeof (this.lpex_loadStartCallback)=="function"){
this.lpex_loadStartCallback(_7c0.total);
}
while(this.lpex_parent.hasChildNodes()){
this.lpex_parent.removeChild(this.lpex_parent.firstChild);
}
for(i=0;i<_7c0.experts.length;i++){
var _7c2=_7c0.experts[i];
this.lpHandleExpert(_7c2);
}
this.lpex_currentTotal=_7c0.total;
if(typeof (this.lpex_showNavigationUICallback)=="function"){
this.lpex_showNavigationUICallback();
}
if(typeof (this.lpex_loadDoneCallback)=="function"){
lpex_loadDoneCallback();
}
}
catch(e){
}
};
this.lpHandleExpert=function(_7c3){
try{
var exp=null;
if(typeof (this.lpex_createExpertCallback)=="function"){
exp=this.lpex_createExpertCallback(_7c3);
this.lpex_parent.appendChild(exp);
}
}
catch(e){
}
};
this.lpNeedNext=function(){
return (this.lpex_currentPage*this.lpex_pageSize)<this.lpex_currentTotal;
};
this.lpNeedPrev=function(){
return (this.lpex_currentPage>1);
};
this.lpGetNextOnclickString=this.objName+".lpOnPage(1);return false;";
this.lpGetPrevOnclickString=this.objName+".lpOnPage(-1);return false;";
this.lpRefreshRequest=function(){
try{
if(document.getElementById("lpexpert_script_pager_"+this.objName)!=null){
document.getElementsByTagName("head")[0].removeChild(document.getElementById("lpexpert_script_pager_"+this.objName));
}
var url=this.lpex_requestUrl.replace(/PAGE_NUMBER/,this.lpex_currentPage);
url=url.replace(/NUM_EXPERTS/,this.lpex_pageSize);
url=url.replace(/CATEGORY/,this.lpex_searchCategory);
url=url.replace(/OBJ_NAME/,this.objName);
url=url.replace(/BANNER_ID/,this.lpex_partnerid);
var obj=document.createElement("script");
obj.setAttribute("id","lpexpert_script_pager_"+this.objName);
obj.setAttribute("language","javascript");
obj.setAttribute("type","text/javascript");
obj.setAttribute("src",url);
document.getElementsByTagName("head")[0].appendChild(obj);
}
catch(e){
}
};
this.lpOnPage=function(_7c7){
try{
this.lpex_currentPage+=_7c7;
this.lpRefreshRequest();
}
catch(e){
}
};
}
var lpexLoadInit={gridNames:[],setInitParams:function(){
try{
var i=0;
if(arguments!=null&&arguments.length>0){
for(i=0;i<arguments.length;i++){
lpexLoadInit.gridNames[lpexLoadInit.gridNames.length]=arguments[i];
}
if(window.attachEvent){
window.attachEvent("onload",lpexLoadInit.runOnLoad);
}else{
window.addEventListener("load",lpexLoadInit.runOnLoad,false);
}
}
}
catch(e){
var i=e;
}
},runOnLoad:function(){
try{
var i=0;
if(typeof (lpexLoadInit.gridNames)!="undefined"){
for(i=0;i<lpexLoadInit.gridNames.length;i++){
eval(lpexLoadInit.gridNames[i]+".lpRefreshRequest()");
}
}
}
catch(e){
var i=e;
}
}};
