function WizardParamEG45240d701679447ba291b924663096ba()
{
this.EG_padding=0;
this.EG_pageNumber='1';
this.EG_imageDefaultExpert='/images/Affiliates/ExpertGrid/manLarge_1.gif';
this.EG_expertUnitHeight=97;
this.EG_expertUnitWidth=498;
this.EG_headerUnitHeight=58;
this.EG_headerUnitWidth=498;
this.EG_footerUnitHeight=38;
this.EG_navigationUnitHeight=28;
this.EG_navigationUnitWidth=-1;
this.EG_bannerGridShape=1;
this.EG_layoutType=1;
this.EG_imageExpert='/images/small/{ExpertID}.jpeg';
this.EG_Version='1.00';
this.EG_def_titleFontFamily='Tahoma';
this.EG_def_titleFontSize='16pt';
this.EG_def_subtitleFontFamily='Tahoma';
this.EG_def_subtitleFontSize='14pt';
this.EG_def_footerFontFamily='Tahoma';
this.EG_def_footerFontSize='12pt';
this.EG_categoryUrl= WizardParam.EG_categoryUrl;
this.EG_url= WizardParam.EG_url;
this.EG_LP_Url= WizardParam.EG_LP_Url;
this.EG_imageUrl= WizardParam.EG_imageUrl;
this.EG_height= WizardParam.EG_height;
this.EG_width= WizardParam.EG_width;
this.EG_CatID= WizardParam.EG_CatID;
if (typeof(WizardParam.EG_params) == 'undefined') this.EG_params=''; else this.EG_params= WizardParam.EG_params;
if (typeof(WizardParam.EG_profileMode) == 'undefined') this.EG_profileMode='Wizard'; else this.EG_profileMode= WizardParam.EG_profileMode;
this.EG_PID='0';
this.EG_AID='0';
this.EG_AffliateID='';
this.EG_SubDomainURL='http://Students.liveperson.com';
this.EG_CategoryName='Chemistry';
this.EG_expertsOutput = "";this.EG_phoneEnabled = false;this.EG_NextShowPicture = false;this.EG_125X125TimerRunning = false;this.EG_125X125RefreshTime = 3000;this.EG_UniqeKey = "WizardParamEG45240d701679447ba291b924663096ba";
this.EG_ExpertGridShortCodeUniqeKey = "EG45240d701679447ba291b924663096ba" ;
this.EG_RefToGrid = new KasambaExpertsGrid_WizardParamEG45240d701679447ba291b924663096ba();
this.EG_ExpertGridDiv = "EG45240d701679447ba291b924663096ba" ;
this.EG_numExpertInPage  = 0 ;
this.EG_totalNumOfExperts  = 0 ;
this.EG_output = '';
if (typeof(WizardParam.EG_titleColor) == 'undefined') this.EG_titleColor='469A21';else this.EG_titleColor= WizardParam.EG_titleColor;
if (typeof(WizardParam.EG_titleFontSize) == 'undefined') this.EG_titleFontSize='16pt';else this.EG_titleFontSize= WizardParam.EG_titleFontSize;
if (typeof(WizardParam.EG_subtitleColor) == 'undefined') this.EG_subtitleColor='469A21';else this.EG_subtitleColor= WizardParam.EG_subtitleColor;
if (typeof(WizardParam.EG_ViewAllUrl) == 'undefined') this.EG_ViewAllUrl='//';else this.EG_ViewAllUrl= WizardParam.EG_ViewAllUrl;
if (typeof(WizardParam.EG_subtitleFontSize) == 'undefined') this.EG_subtitleFontSize='14pt';else this.EG_subtitleFontSize= WizardParam.EG_subtitleFontSize;
if (typeof(WizardParam.EG_imageContactLive) == 'undefined') this.EG_imageContactLive='/images/Affiliates/ExpertGrid/Buttons/size1_a_orange1.gif';else this.EG_imageContactLive= WizardParam.EG_imageContactLive;
if (typeof(WizardParam.EG_SubSubCatID) == 'undefined') this.EG_SubSubCatID=0; else this.EG_SubSubCatID= WizardParam.EG_SubSubCatID; 
if (typeof(WizardParam.EG_header) == 'undefined') this.EG_header=4; else this.EG_header= WizardParam.EG_header; 
if (typeof(WizardParam.EG_imageSpecialOffer) == 'undefined') this.EG_imageSpecialOffer='/images/Affiliates/ExpertGrid/SpecialOffers/ready_500_green4black.gif';else this.EG_imageSpecialOffer= WizardParam.EG_imageSpecialOffer;
if (typeof(WizardParam.EG_subtitleItalic) == 'undefined') this.EG_subtitleItalic='normal';else this.EG_subtitleItalic= WizardParam.EG_subtitleItalic;
if (typeof(WizardParam.EG_footerBold) == 'undefined') this.EG_footerBold='normal';else this.EG_footerBold= WizardParam.EG_footerBold;
if (typeof(WizardParam.EG_titleFontFamily) == 'undefined') this.EG_titleFontFamily='Tahoma';else this.EG_titleFontFamily= WizardParam.EG_titleFontFamily;
if (typeof(WizardParam.EG_onlineStatusColor) == 'undefined') this.EG_onlineStatusColor='fe4f00';else this.EG_onlineStatusColor= WizardParam.EG_onlineStatusColor;
if (typeof(WizardParam.EG_titleUnderline) == 'undefined') this.EG_titleUnderline='none';else this.EG_titleUnderline= WizardParam.EG_titleUnderline;
if (typeof(WizardParam.EG_SubCatID) == 'undefined') this.EG_SubCatID=0; else this.EG_SubCatID= WizardParam.EG_SubCatID; 
if (typeof(WizardParam.EG_subtitleBold) == 'undefined') this.EG_subtitleBold='normal';else this.EG_subtitleBold= WizardParam.EG_subtitleBold;
if (typeof(WizardParam.EG_titleText) == 'undefined') this.EG_titleText='Get advice today!';else this.EG_titleText= WizardParam.EG_titleText;
if (typeof(WizardParam.EG_imageSendRequest) == 'undefined') this.EG_imageSendRequest='/images/Affiliates/ExpertGrid/Buttons/size1_req_orange1.gif';else this.EG_imageSendRequest= WizardParam.EG_imageSendRequest;
if (typeof(WizardParam.EG_specialOfferType) == 'undefined') this.EG_specialOfferType=3; else this.EG_specialOfferType= WizardParam.EG_specialOfferType; 
if (typeof(WizardParam.EG_specialOfferLayout) == 'undefined') this.EG_specialOfferLayout=3; else this.EG_specialOfferLayout= WizardParam.EG_specialOfferLayout; 
if (typeof(WizardParam.EG_screenNameColor) == 'undefined') this.EG_screenNameColor='336699';else this.EG_screenNameColor= WizardParam.EG_screenNameColor;
if (typeof(WizardParam.EG_linksColor) == 'undefined') this.EG_linksColor='336699';else this.EG_linksColor= WizardParam.EG_linksColor;
if (typeof(WizardParam.EG_bgColor2) == 'undefined') this.EG_bgColor2='E5F3D9';else this.EG_bgColor2= WizardParam.EG_bgColor2;
if (typeof(WizardParam.EG_MainCatID) == 'undefined') this.EG_MainCatID=0; else this.EG_MainCatID= WizardParam.EG_MainCatID; 
if (typeof(WizardParam.EG_ShowRating) == 'undefined') this.EG_ShowRating=true;else this.EG_ShowRating= WizardParam.EG_ShowRating;
if (typeof(WizardParam.EG_subtitleUnderline) == 'undefined') this.EG_subtitleUnderline='none';else this.EG_subtitleUnderline= WizardParam.EG_subtitleUnderline;
if (typeof(WizardParam.EG_titleItalic) == 'undefined') this.EG_titleItalic='normal';else this.EG_titleItalic= WizardParam.EG_titleItalic;
if (typeof(WizardParam.EG_paramID) == 'undefined') this.EG_paramID=1; else this.EG_paramID= WizardParam.EG_paramID; 
if (typeof(WizardParam.EG_footerColor) == 'undefined') this.EG_footerColor='000000';else this.EG_footerColor= WizardParam.EG_footerColor;
if (typeof(WizardParam.EG_numExperts) == 'undefined') this.EG_numExperts=5; else this.EG_numExperts= WizardParam.EG_numExperts; 
if (typeof(WizardParam.EG_footerFontSize) == 'undefined') this.EG_footerFontSize='12pt';else this.EG_footerFontSize= WizardParam.EG_footerFontSize;
if (typeof(WizardParam.EG_headerBgColor) == 'undefined') this.EG_headerBgColor='E5F3D9';else this.EG_headerBgColor= WizardParam.EG_headerBgColor;
if (typeof(WizardParam.EG_subtitleText) == 'undefined') this.EG_subtitleText='Click below to get started now!';else this.EG_subtitleText= WizardParam.EG_subtitleText;
if (typeof(WizardParam.EG_footerFontFamily) == 'undefined') this.EG_footerFontFamily='Tahoma';else this.EG_footerFontFamily= WizardParam.EG_footerFontFamily;
if (typeof(WizardParam.EG_bgColor1) == 'undefined') this.EG_bgColor1='FFFFFF';else this.EG_bgColor1= WizardParam.EG_bgColor1;
if (typeof(WizardParam.EG_subtitleFontFamily) == 'undefined') this.EG_subtitleFontFamily='Tahoma';else this.EG_subtitleFontFamily= WizardParam.EG_subtitleFontFamily;
if (typeof(WizardParam.EG_borderColor) == 'undefined') this.EG_borderColor='C1DFAB';else this.EG_borderColor= WizardParam.EG_borderColor;
if (typeof(WizardParam.EG_titleBold) == 'undefined') this.EG_titleBold='normal';else this.EG_titleBold= WizardParam.EG_titleBold;
if (typeof(WizardParam.EG_textColor) == 'undefined') this.EG_textColor='000000';else this.EG_textColor= WizardParam.EG_textColor;
if (typeof(WizardParam.EG_footerText) == 'undefined') this.EG_footerText='Give one of our experts a try today!';else this.EG_footerText= WizardParam.EG_footerText;
if (typeof(WizardParam.EG_footerUnderline) == 'undefined') this.EG_footerUnderline='none';else this.EG_footerUnderline= WizardParam.EG_footerUnderline;
if (typeof(WizardParam.EG_footer) == 'undefined') this.EG_footer=3; else this.EG_footer= WizardParam.EG_footer; 
if (typeof(WizardParam.EG_footerItalic) == 'undefined') this.EG_footerItalic='normal';else this.EG_footerItalic= WizardParam.EG_footerItalic;
if (typeof(WizardParam.EG_ShowFee) == 'undefined') this.EG_ShowFee=true;else this.EG_ShowFee= WizardParam.EG_ShowFee;
}


function KasambaExpertsGrid_WizardParamEG45240d701679447ba291b924663096ba()
{
this.EG_id = new Array("227881","1171647","1053919","1270478","1600657","22309","187266","249825","169485","513820","249358","676989","549788","1083175","1301847","784455","771296","810197","260563","415495","516748","1002076","799038","1370674","126537","188922","224038","488972","627268","1513207","220123","1168356","1012341","714390","1576771","258564","994189","1489402","37569","251473","1384633","1285920","66268","1352881","977488");
this.EG_fullname = new Array("Enggvicky","Prabina","Chemtopper","Sheheryar Hamid","Deli Olara","URUMATE JAVA CPP C .NET","Richa Kumar","Homework Help","kayn","H. Zhylliolom","chemMaths","Nine-One-One","Habibullah","expert 24x7","Hai Duong","Renekert","Savita Shinde","BIOFIN HELP","MsAd","particle","Talented_Provider","Professor K","AoneTutor","easy solutions","RobertL","Doctor4urhelp","Math Helper","Science Guru PHP_JAVA_C","initiator","Buffy A","Expert4uall","Quick easy solutions","Rohi","Jonathan Mooney","Ambers","Galaxy of Thoughts","Scot Fagerland","Mr. Chem","drwhitephd","Dr ARUNTRIKHA","economics and statistics","Mohammad Umar Khalid","GAM","jamshead iqbal","Destiny_fighter");
this.EG_description = new Array("B.tech,IIT Roorkee.Freelance consultant of Civil Engg. Online tests, Maths, Chemistry, Physics, Statistics, Biology, Economics are my passion.You can expect any solution.","I can provide comprehensive and extensive HELP in Physical chemistry and inorganic chemistry.","I have completed M S in Chemistry and can proficiently handle all assignments, projects, labs, online work in Organic, Inorganic, Physical, Bio Chemistry with reasonable rates","Highly Qualified and an Expert in the field of Chemistry. 5 years of teaching experience at various renowned institutions.","Chemistry Expert - Biochemistry- General Chemistry- Elementary Chemistry - Organic chemistry - Get your chemistry homework, lab and online test help at affordable rate.","Chemistry Expert - Biochemistry - Organic chemistry - Get your chemistry homework done immediately with high quality standard","Expert in Physical sciences with specialization in chemistry,","We are experts in all brances of Chemistry (Organic or Inorganic) Contact us for homework help or online tutoring and we will not let you down.","Get questions answered, receive valuable tips for approaching similar problems and references to interactive sites and tutorials on the net as well.","Expert knowledge in chemistry. Molecular structure, chemical reactions, stoichiometry, thermochemistry, kinetic theory, electrochemistry, quantum chemistry, and more.","I can provide solution of any problem in mathematics,chemistry and physics either basic or rigorous.","Quick and inexpensive aid. Can help with mathematics, Chem, Physics, programming (C, C++, Java, V.B. etc.) and Paper writing too.","Chemistry is my Passion. If you are looking for the best tutor of  Chemistry, an expert in stoichiometry, Mole Concept, or Organic Chemistry, you are at the right place.","I am a chemistry expert and I am comfortable with Physical, organic and inorganic chemistry. Please contact me for instant help. If I am away, please email me.","GENERAL CHEMISTRY Expert - EXPERIENCED WITH SAT II, AP, IB CHEMISTRY!!!","Help with chemistry problems and concepts. In English or Spanish. More than twenty years designing curriculum and labs, and teaching the 1st university chemistry courses.","Qualified (masters degree), proficient (7 years experience) with numerical and theoretical areas of Chemistry, successfully helped 2500 students during online tutoring session","I can solve with explanation problems related to general chemistry, analytical chemistry, physical chemistry and organic chemistry.","I am a chemistry tutor and I can provide quick solution to you. I can do any kind of assignments","I am a graduate in science with chemistry and Master in engineering.Working as Asst.Proff.in silicon since 15 years.I specialise in all fields of chemistry, math and physics.","I have taught Mathematics, physics and chemistry at school level and college students. I can provide the solution in depth in all expert categories","Let a Ph.D. chemist with 18 years college teaching experience help you - master of analogies - special intro discount","For professional help with all your Chemistry problems,help with chemistry assignments, university papers, lab reports & chemistry homework help contact me ASAP!","I am an expert in chemistry.","Expert Tutoring Service in Math, Physics and Chemistry","Expert in Physical sciences with specialization in chemistry,biochemistry as well as life sciences","I have taken many Chemistry Courses and received all A.  I will do my best to help you understand Chemistry","i can help you relating to different elements, periodic table, Atomic weight, mass number, numericals, Chemical reactions, radioactivity, organic and other famous processes.","group of experts dealing in maths ,statistics,biology physics,chemistry and engineering. can solve any problem in Chemistry","Expert chemist and biochemist at your service","Can render my services in the field of Science and Mathematics at all levels.","i am equipped to solve your problems related to chemistry. I have my sound grip over combustion analysis problems and organic chemistry.","I know all the the basic and key concept of Chemistry and can solve and explain any problem of Chemistry.","I'm a Ph.D. student in physical chemistry who has served as a TA.  I can provide help on most college and high school-level chemistry problems.","I am a senior tutor in Chemistry,Low rate, fast response and high quality work. Get A+ grade in your class. Specialist in homework assistance.","All the problems related to Engineering ,Mathematics ,Science and psychology will be given with detailed analysis","Chemistry tutor for high school and introductory college courses!","GENERAL CHEMISTRY EXPERT !!! Experienced w/ General Chemistry.","Ph.D. organic chemist, 10+ yrs: synthesis-small molecules, polymers; gas chromatography-methods development; bio-engineering-project management; teaching-chemistry/biology in high school & college.","Ph.D Professor with 30 years expertise in teaching chemistry at high school,undergraduate,graduate and doctorol levels. Expert in critical analysis of research papers/reports.","CHEMISTRY EXPERT help. Quality assistance in organic, inorganic, physical and biochemistry assignments and homework.","Highly qualified and an expert in Chemistry","Ph.D. will help you with questions in science (chemistry, physics, etc.) and math.","I can help in Analytical Chemistry, Organic Chemistry, Physical Chemistry, In-organic Chemistry and Electro Chemistry","I have experience in solving chemistry for high school and college level.");
this.EG_picid = new Array("227881","1171647","1053919","1270478","1600657","22309","187266","249825","169485","513820","249358","676989","549788","1083175","1301847","784455","771296","810197","260563","415495","516748","1002076","799038","1370674","0","188922","224038","488972","627268","0","220123","1168356","1012341","714390","1576771","258564","994189","1489402","37569","251473","1384633","1285920","66268","1352881","0");
this.EG_ratingpic = new Array("10","10","10","10","0","10","10","9","10","10","10","10","10","9","10","10","10","9","9","9","9","10","10","10","10","10","10","10","9","10","9","9","8","10","10","10","10","10","9","8","7","8","10","8","10");
this.EG_ratersnumber = new Array("1998","107","141","33","0","3240","1566","974","479","54","878","788","148","263","15","38","299","329","231","186","56","18","144","3","839","104","48","52","503","20","56","38","29","16","3","5","10","3","3","6","5","30","32","1","40");
this.EG_rating = new Array("4.833833","4.869158","4.929078","4.787878","0","4.834259","4.8659","4.677618","4.922755","4.925925","4.774487","4.942893","4.871621","4.676806","4.799998","4.894736","4.876254","4.674772","4.536796","4.639784","4.660714","4.888888","4.833333","5","4.766387","4.759615","4.875","4.75","4.664015","4.899999","4.678571","4.736842","4.241379","5","5","4.8","4.9","5","4.666666","4.166666","3.6","4.099999","4.874999","4","4.799999");
this.EG_status = new Array("1","1","1","1","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0");
this.EG_onlinefee = new Array("0.5","0.5","0.5","0.5","0.5","0.5","0.8","0.5","1","0.5","0.99","0.5","0.75","0.7","1","0.5","0.5","0.95","0.99","0.5","1","1","3","0.5","0.5","0.9","0.5","0.7","0.5","1","1","0.5","1","0.5","1","1.17","0.5","0.5","2","1","0.5","0.5","0.5","0.5","0.5");
this.EG_title = new Array("","","Mrs","","","System Engineer","","","","","","","","","","","","","","","A talented and creative expert","Dr.","Aonetutor","","","","","","","","","","","","","","","","","","","Mr.","","","");
}

var WizardParam =  new EG45240d701679447ba291b924663096ba();
var ExpertGridObject_WizardParamEG45240d701679447ba291b924663096ba=  new WizardParamEG45240d701679447ba291b924663096ba();
var expertgrid_WizardParamEG45240d701679447ba291b924663096ba ;
function Start_WizardParamEG45240d701679447ba291b924663096ba(){if (typeof(ExpertGridObject_WizardParamEG45240d701679447ba291b924663096ba.EG_Disable_Render)== 'undefined') { EGrender(ExpertGridObject_WizardParamEG45240d701679447ba291b924663096ba,expertgrid_WizardParamEG45240d701679447ba291b924663096ba);}}
 Start_WizardParamEG45240d701679447ba291b924663096ba();


//Importent when changing this file the file \Affiliates\ShowExpertGrid.aspx on WEB Kasammba project need to be change too!!!!!

var Tel = "";

var noExpertsHtmlMsg; 
var noExpertsHtmlMsgHeight = 66;
//accumulated is the height of the non experts area in pixels. 
var accumulated=0; 

function EGgetExpertPicture(ExpertGridObject,expid, picID )
{
    var expPic = "";
    var imageURL = ExpertGridObject.EG_imageExpert.replace('{ExpertID}',expid);
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    expPic += "<a href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/professional/expert-profile.aspx?CatID=" + ExpertGridObject.EG_CatID +"&ExpID=" + expid +"\")' style='text-decoration:none; border-width:0px;' >";   
    expPic+=  "<img border='0' src='" + ExpertGridObject.EG_LP_Url + imageURL +"'></a>";
    return expPic;
}

function EGgetExperName (ExpertGridObject,expid, fullName, title,flglineHeight, numberOfChars)
{
    var expName = "";  
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;              
    expName += "<div style='padding-top:0px! important;margin-top:0px! important;'><a style='color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/professional/expert-profile.aspx?CatID=" + ExpertGridObject.EG_CatID +"&ExpID=" + expid +"\")'>";    
    if ((title != "") && (parseInt(ExpertGridObject.EG_MainCatID) == 10341)) //Professional Counseling
    {
        var nameAndTitle = fullName + " , " + title;
        if (numberOfChars != null)
        {
            nameAndTitle = cutString(ExpertGridObject,nameAndTitle, numberOfChars);  
        }      
        if (flglineHeight ==1) { expName += "<span style='line-height: 8pt;font-family:Arial; font-weight:bold; font-size:8pt;'>" + nameAndTitle +"</span></a><div/>";}
        if (flglineHeight ==0) { expName += "<span style='font-family:Arial; font-weight:bold; font-size:8pt;'>" + nameAndTitle +"</span></a><div/>";}
    }
    else
    {
         if (numberOfChars != null)
         {
            fullName = cutString(ExpertGridObject,fullName, numberOfChars);
         }
         
         if (flglineHeight ==1) { expName += "<span style='line-height: 8pt;font-family:Arial; font-weight:bold; font-size:8pt;'>"+ fullName +"</span></a></div>";}
         if (flglineHeight ==0) { expName += "<span style='font-family:Arial; font-weight:bold; font-size:8pt;'>"+ fullName +"</span></a></div>";}
    }
    return expName;
}

function EGgetExpertRating(ExpertGridObject,expid, rating, ratingPic, ratingNumber,flgNewLine)
{
    var ratingStr ="";
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
    if ( (ExpertGridObject.EG_ShowRating) && (parseInt(ratingNumber) > 0) )
    {       
        
        if ( flgNewLine == 1)
        {
            ratingStr += "<div><a  style='line-height: 1em;text-decoration:none; border-width:0px;'  href=javascript:KasambaEGopenRating(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + expid + ")>";
            ratingStr += "<img title=' "+ KasambaCurrencyFormatted(ExpertGridObject,rating , "")  +"' src='" + ExpertGridObject.EG_imageUrl + "/images/rating/rate" + ratingPic + ".gif'  style='text-decoration:none; border-width:0px;'  border='0' WIDTH='64' HEIGHT='12' align='absmiddle'></a></div>";
        }
         if ( flgNewLine == 0)
        {
            ratingStr += "<a  style='line-height: 1em;text-decoration:none; border-width:0px;'  href=javascript:KasambaEGopenRating(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + expid + ")>";
            ratingStr += "<img title=' "+ KasambaCurrencyFormatted(ExpertGridObject,rating , "")  +"' src='" + ExpertGridObject.EG_imageUrl + "/images/rating/rate" + ratingPic + ".gif'  style='text-decoration:none; border-width:0px;'  border='0' WIDTH='64' HEIGHT='12' align='absmiddle'></a>";
        } 
            
        
         if (parseInt(ratingNumber) == 1)
        {           
            ratingStr +=  "<span ><a style='line-height: 1.5em;font-family:Verdana; font-size:7pt;color:#"+ExpertGridObject.EG_linksColor+";' href=javascript:KasambaEGopenRating(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + expid + ")>(1 review)</a></span>";
        }
        else
        {            
            ratingStr +=  "<span ><a style='line-height: 1.5em;font-family:Verdana; font-size:7pt;color:#"+ExpertGridObject.EG_linksColor+";' href=javascript:KasambaEGopenRating(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + expid + ")>(" + ratingNumber + " reviews)</a></span>";
        }
    }
    return ratingStr;
}

function EGgetExpertDescription (ExpertGridObject,description)
{    
    return "<div style='line-height: 8pt;font-family:Verdana; font-size:7pt;color:#"+ExpertGridObject.EG_textColor+"'>" + description + "</div>";
}

function EGGetContactElement(ExpertGridObject,status, memberID)
{
    var contact ="";
    switch (parseInt(status))
    {
        case 0:
            contact +=EGgetOfflineContent(ExpertGridObject,memberID);
            break;
        case 1:
            contact +=EGgetOnlineContent(ExpertGridObject,memberID, false);
            break;
        case 2:
            contact +=EGgetBusyContent(ExpertGridObject,memberID);
            break;
        case 3:
            contact +=EGgetOfflineContent(ExpertGridObject,memberID);
            break;
        case 4:
            contact +=EGgetOnlineContent(ExpertGridObject,memberID, true);
            break;
        default:
            contact +=EGgetOfflineContent(ExpertGridObject,memberID);
            break; 
    }
    return contact;
}

function EGgetOfflineContent(ExpertGridObject,memberID)
{
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
    var offlineContent ="";   
    offlineContent += "<span style='text-decoration:none; border-width:0px;'><a href='javascript:KasambaEGOpenAskByMail(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + ExpertGridObject.EG_CatID + "," + memberID + ")' title='Send a request' style='text-decoration:none; border-width:0px;'><img src='"+ ExpertGridObject.EG_url + ExpertGridObject.EG_imageSendRequest +"' border='0' style='text-decoration:none; border-width:0px;'></a></span>";
    return offlineContent;
}

function EGgetOnlineContent(ExpertGridObject,memberID, phoneAndChat)
{
    var onlineContent ="";
    
    if (parseInt(ExpertGridObject.EG_paramID) == 1)
    {        
        onlineContent += "<span style='font-family:arial; font-weight:bold; font-size:14px; color:#"+ExpertGridObject.EG_onlineStatusColor+";text-decoration:none; border-width:0px;'>Online</span>";
    }
    if (ExpertGridObject.EG_phoneEnabled)
    {        
        onlineContent += "<div><img src='" + ExpertGridObject.EG_imageUrl + "/images/view1/Status/OnlineChat.gif' alt='Available for chat' title='Available for chat' border='0'></div>";
        if (phoneAndChat)
        {            
            onlineContent += "<div><img src='text-decoration:none; border-width:0px;'" + ExpertGridObject.EG_imageUrl + "/images/view1/Status/OnlinePhone.gif' alt='Available for phone' title='Available for phone' border='0'></div>";
        }
    }
    
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    onlineContent += "<span><a style='text-decoration:none; border-width:0px;' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/session/session-selector.aspx?ExpID=" + memberID + "&catID=" + ExpertGridObject.EG_CatID+ "\")' title='Contact Live!'><img style='text-decoration:none; border-width:0px;' src='"+ ExpertGridObject.EG_url + ExpertGridObject.EG_imageContactLive +"'  border='0'></a></span>";
    return onlineContent;
}

function EGgetonlineFee(ExpertGridObject,fee, status)
{
    if ((parseInt(status) == 1) || (parseInt(status) == 4)) 
    {
        if (ExpertGridObject.EG_ShowFee)
        {
            return "<span style='font-family:Tahoma; font-size:7pt;color:#"+ExpertGridObject.EG_textColor+"'>" + KasambaCurrencyFormatted(ExpertGridObject,fee, "$") + "/minute";
        }
        else
        {
            return "";
        }
    }
    else
    {
       return ""; 
    }
}

function EGgetBusyContent(ExpertGridObject,memberID)
{
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
    var busyContent ="";
    if (parseInt(ExpertGridObject.EG_paramID) == 1)
    {
        busyContent += "<span style='FONT-WEIGHT: bold; FONT-SIZE: 9pt;font-family:arial;color:#"+ExpertGridObject.EG_textColor+"'>Busy</span>";
    }    
    busyContent += "<span style='text-decoration:none; border-width:0px;'><a href='javascript:KasambaEGOpenAskByMail(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + "," + ExpertGridObject.EG_CatID + "," + memberID + ")' title='Send a request' style='text-decoration:none; border-width:0px;'><img src='" + ExpertGridObject.EG_LP_Url + "/images/view1/Status/Status_0.gif' border='0' WIDTH='122' HEIGHT='21' style='text-decoration:none; border-width:0px;'></a></span>";
    return busyContent;
}

function KasambaEGopenRating (UniqeKey,EG_ExpertGridShortCodeUniqeKey,memberID)
{
   var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
   var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
        
    }
    var ratingUrl = ExpertGridObject.EG_LP_Url + "/rating/expert-rating.aspx?i_MemID=" + memberID
	window.open(ratingUrl, 'rating', 'scrollbars=yes,height=400,width=450,menubar=no,resizable=yes,titlebar=no,toolbar=no,status=no');
}

function KasambaEGOpenAskByMail (UniqeKey,EG_ExpertGridShortCodeUniqeKey,categoryID, memberID)
{
   var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
   var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
        
    }
    
    var mailUrl = "";
    if(parseInt(ExpertGridObject.EG_specialOfferType)==2)
    {
        mailUrl = ExpertGridObject.EG_LP_Url + "/registration/send-email.aspx?CatID=" + categoryID +"&ExpID=" + memberID + "&twid=2&fm=yes&" + ExpertGridObject.EG_params;	   
    } 
    else
    {
	    mailUrl = ExpertGridObject.EG_LP_Url + "/registration/send-email.aspx?CatID=" + categoryID +"&ExpID=" + memberID + "&twid=2&" + ExpertGridObject.EG_params;	
	}
	
	if (ExpertGridObject.EG_AffliateID == 'CJ')
    {
        mailUrl = "http://www.jdoqocy.com/click-" + ExpertGridObject.EG_PID + "-" 
              + ExpertGridObject.EG_AID + "?URL=" + escape(mailUrl + "&accountRef=liveperson");
    }
    
	window.open(mailUrl);
}

function KasambaCurrencyFormatted(ExpertGridObject,amount, currencyStr)
{
	var kasamba_index = parseFloat(amount);
	if(isNaN(kasamba_index)) { kasamba_index = 0.00; }
	var kasamba_minus = '';
	if(kasamba_index < 0) { kasamba_minus = '-'; }
	kasamba_index = Math.abs(kasamba_index);
	kasamba_index = parseInt((kasamba_index + .005) * 100);
	kasamba_index = kasamba_index / 100;
	kasamba_str = new String(kasamba_index);
	if(kasamba_str.indexOf('.') < 0) { kasamba_str += '.00'; }
	if(kasamba_str.indexOf('.') == (kasamba_str.length - 2)) { kasamba_str += '0'; }
	kasamba_str = kasamba_minus + kasamba_str;
	return currencyStr + kasamba_str;
}

function EGrender(ExpertGridObject,expertgrid)
{   
    //In 125X125 first time show expert details
     var UniqeKey =   ExpertGridObject.EG_UniqeKey;
     var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
     
    if (parseInt(ExpertGridObject.EG_CatID) > 0) 
    {
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            EGrenderData(ExpertGridObject,expertgrid);
        }
        else
        {
            var sortBy = GetSortByValue(ExpertGridObject)
            var expertDataUrl = ExpertGridObject.EG_url + "/Affiliates/GetExpertsStringJS.aspx?CatID=" + ExpertGridObject.EG_CatID + "&SortBy=" + sortBy + "&PageNumber=1&PageSize=" + ExpertGridObject.EG_numExperts *3;
            var ifarmoutput =  '<iframe id="KasambaIframe" name="KasambaIframe" onload="EGrenderData(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")" width="1" height="1" frameborder="0" src="' + expertDataUrl + '"></iframe>';
            document.getElementById("output2").innerHTML = ifarmoutput;
        }
     }      
     else
     {
        EGrenderData(ExpertGridObject,expertgrid);
     } 
}


function EGrenderData(ExpertGridObject,expertgrid)
{       
    var header='';
    var footer='';
    var experts='';      
    
    var noExperts =false;
    var paddingHeight=0;      
   
    if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
    {
        expertgrid = ExpertGridObject.EG_RefToGrid;
    }  
    else if (parseInt(ExpertGridObject.EG_CatID) > 0) 
    {
        expertgrid=document.getElementById('KasambaIframe').contentWindow;        
    }   
     
    if (expertgrid!=null) 
    {       
        if (expertgrid.EG_id!=null)
        {          
            ExpertGridObject.EG_totalNumOfExperts = expertgrid.EG_id.length; 
        }
        else
        {
            noExperts =true;
        }      
    }       
   
    switch(ExpertGridObject.EG_header)
    {
        case 1 :
                    //do nothing- no header
                break;
        case 2:
                    header=getHeader500X618NoText(ExpertGridObject);        
                break; 
        case 3:
                    header=getHeader500X618WithText(ExpertGridObject); 
                break;
        case 4:
                    header=getHeader500X618TextWithIcon(ExpertGridObject,false);                          
                break;
        case 5:       
                    header=getHeader728X90WithIcon(ExpertGridObject,false);                          
                break;  
        case 6:       
                    header=getHeader728X90WithText(ExpertGridObject,false);                          
                break;
        case 7 :
                     header=getHeader120X600WithIcon(ExpertGridObject);  
                 break;
        case 8 :
                     header=getHeader468X60WithText(ExpertGridObject);  
                 break; 
        case 9 :
                     header=getHeader468X60NoText(ExpertGridObject);  
                 break;          
    }        

    ExpertGridObject.EG_expertsOutput = "";
    noExpertsHtmlMsg = "";
    
    switch(parseInt(ExpertGridObject.EG_paramID))
    {
        case 1 :                   
                calcExperts(ExpertGridObject);
                paddingHeight = calcPadding(ExpertGridObject,noExperts);             
                
                if (!noExperts)
                {                    
                    getExpertRows1(ExpertGridObject);   
                    experts= ExpertGridObject.EG_expertsOutput;                  
                }
                else 
                {
                    experts = getNoExpertMessageRow(ExpertGridObject);                   
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight; 
                }                     
                
                break;
        case 2:     
                calcExperts(ExpertGridObject);  
                paddingHeight = calcPadding(ExpertGridObject,noExperts);                       
                 if (!noExperts)
                {
                    
                    getExpertRows2(ExpertGridObject);   
                    experts= ExpertGridObject.EG_expertsOutput;                  
                }
                else 
                {
                    experts = getNoExpertMessageRow(ExpertGridObject);
                 
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight; 
                }                      
                break; 
        case 3:
                ExpertGridObject.EG_numExpertInPage = 1 ;
                if (!noExperts)
                {
                    if (ExpertGridObject.EG_NextShowPicture)
                    {
                        getExpertRows3Picture(ExpertGridObject);
                        ExpertGridObject.EG_NextShowPicture = false;     
                    }
                    else
                    {
                        getExpertRows3Details(ExpertGridObject);
                        ExpertGridObject.EG_NextShowPicture = true;
                    }
                    experts= ExpertGridObject.EG_expertsOutput;
                }
                else
                {
                    experts = getNoExpertMessageRow(ExpertGridObject);
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight;
                }
                
                
                if (!ExpertGridObject.EG_125X125TimerRunning)
                {
                    
                    ExpertGridObject.EG_125X125TimerRunning = true;
                    
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                    var strSetInterval = "setInterval("+"'Start_"+UniqeKey+"()',"+ExpertGridObject.EG_125X125RefreshTime+");";
                    eval (strSetInterval);
                    
                }
                break;
        case 4:    
                
                ExpertGridObject.EG_numExpertInPage = 2;       
                if (!noExperts)
                {
                    getExpertColumns1(ExpertGridObject); 
                    experts= ExpertGridObject.EG_expertsOutput;                
                }    
                else
                {
                    experts = getNoExpertsColumn1(ExpertGridObject,2*ExpertGridObject.EG_expertUnitWidth)                
                }      
                
                break;
        case 5:
                ExpertGridObject.EG_numExpertInPage = 1;
                if (!noExperts)
                {
                    getExpertColumns2(ExpertGridObject); 
                    experts= ExpertGridObject.EG_expertsOutput;                
                }    
                else
                {
                    experts = getNoExpertsColumn2(ExpertGridObject,ExpertGridObject.EG_expertUnitWidth)                
                }                                
                
                break;
        case 6:             
             
                calcExperts(ExpertGridObject);  
                paddingHeight = calcPadding(ExpertGridObject,noExperts);                       
                 if (!noExperts)
                {
                    
                    getExpertRows4(ExpertGridObject);   
                    experts= ExpertGridObject.EG_expertsOutput;                  
                }
                else 
                {
                    experts = getNoExpertMessageRow(ExpertGridObject);
                   
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight; 
                }      
                                     
               break;
        case 7:              
                
                calcExperts(ExpertGridObject);  
                paddingHeight = calcPadding(ExpertGridObject,noExperts);                       
                 if (!noExperts)
                {                   
                    getExpertRows5(ExpertGridObject);   
                    experts= ExpertGridObject.EG_expertsOutput;                  
                }
                else 
                {
                    
                    experts = getNoExpertMessageRow(ExpertGridObject);                   
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight; 
                }
                break;
        case 8:         
                calcExperts(ExpertGridObject);        
                paddingHeight = calcPadding(ExpertGridObject,noExperts);                       
                 if (!noExperts)
                {                   
                    getExpertRows6(ExpertGridObject);   
                    experts= ExpertGridObject.EG_expertsOutput;                  
                }
                else 
                {
                    experts = getNoExpertMessageRowByExpertHeight(ExpertGridObject);                   
                    paddingHeight = paddingHeight-noExpertsHtmlMsgHeight; 
                }                    
                break;
    }        
   
    switch(ExpertGridObject.EG_footer)
    { 
        case 1:
            //do nothing- no footer                                 
             break;         
        case 2:             
             footer=getFooter500X618NoText(ExpertGridObject);                      
             break;
        case 3: 
             footer=getFooter500X618WithText(ExpertGridObject);    
             break;
        case 4:
             footer=getFooter500X618Navigation(ExpertGridObject);  
             break; 
        case 5:
             footer=getFooter728X90(ExpertGridObject); 
             break;    
        case 6:
             footer=getFooter125X125(ExpertGridObject);       
             break;          
    }        
   
    if (paddingHeight>0)      
    {         
       footer+=getPadding(ExpertGridObject,paddingHeight);
    }      
    
    
    var output ="<table style='border-collapse: collapse; width:" + ExpertGridObject.EG_width + "px;height:" + ExpertGridObject.EG_height +"px;' cellpadding='0'  cellspacing='0'>";     
    output+=header + experts + footer;
    output+="</table>";     

    ExpertGridObject.EG_output = output;
    
    if (typeof(ExpertGridObject.EG_Disable_Render)== 'undefined')
    {
            document.getElementById(ExpertGridObject.EG_ExpertGridDiv).innerHTML  = ExpertGridObject.EG_output;
    }
    else
    {
        document.getElementById("output").innerHTML  = ExpertGridObject.EG_output;
    }
   
}

function getNoExpertsColumn1(ExpertGridObject,width)
{
    var message =""
    var textStyle="text-align:center;font-size:12px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "width:"+ width +"px;border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
       
    message = "<td valign='center' style='" + tdStyle + "'  >";
    message+= "No experts are registered in this sub-category. Please select another sub-category.</td>" 
    return message
}

function getNoExpertsColumn2(ExpertGridObject,width)
{
    var message =""
    var textStyle="text-align:center;font-size:12px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "width:"+ width +"px;background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
       
     //ExpertGridObject.EG_expertsOutput closes the html TR, Table, TD  that was started in the header function  Header468X60WithText or Header468X60NoText     
    message+=    "<td valign='center' style='" + tdStyle + "'  >No experts are registered in this sub-category. Please select another sub-category.</td>";
    message+=        "</tr>";
    message+=        "</table>";
    message+=    "</td>";  
    
    return message;      
}


function getNoExpertMessageRow(ExpertGridObject)
{
    var message =""
    var textStyle="text-align:center;font-size:12px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
       
    message= "<tr><td style='"+textStyle+";border:1px solid #"+ExpertGridObject.EG_borderColor+";height:65px;background-color:#"+ExpertGridObject.EG_bgColor1+";' >No experts are registered in this sub-category. Please select another sub-category.</td></tr>"
    
    return message;
}

function getNoExpertMessageRowByExpertHeight(ExpertGridObject)
{
    var message =""
    var textStyle="height:"+ ExpertGridObject.EG_expertUnitHeight +"px;text-align:center;font-size:12px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
       
    message= "<tr><td style='"+tdStyle+";' >No experts are registered in this sub-category. Please select another sub-category.</td></tr>"
    
    return message;
}

function calcExperts(ExpertGridObject)
{      
    accumulated = 0;
    if (ExpertGridObject.EG_headerUnitHeight>0)
        accumulated+=ExpertGridObject.EG_headerUnitHeight+1;           

    if (ExpertGridObject.EG_footerUnitHeight>0)
        accumulated+=ExpertGridObject.EG_footerUnitHeight+1 ;        

    if (ExpertGridObject.EG_navigationUnitHeight>0)
        accumulated+= ExpertGridObject.EG_navigationUnitHeight+ 1;  

    //the -1 is for the base border of the grid
    accumulated = ExpertGridObject.EG_height - accumulated -1 ; 
     //calculating how many experts are to be shown 
    //we add 1 pixel for the border of the expert unit.          
    calculatedNumberExperts = Math.floor( accumulated / (ExpertGridObject.EG_expertUnitHeight +1 ) )           
    
    if (ExpertGridObject.EG_totalNumOfExperts < calculatedNumberExperts && parseInt(ExpertGridObject.EG_CatID) > 0)
    {
       calculatedNumberExperts = ExpertGridObject.EG_totalNumOfExperts        
    }        
     
    //this parameter is crucial for this page   
    ExpertGridObject.EG_numExpertInPage = calculatedNumberExperts;
    
    //if no header and footer, add one expert.    
    if (ExpertGridObject.EG_header==1 && ( parseInt(ExpertGridObject.EG_paramID) == 1 || parseInt(ExpertGridObject.EG_paramID) == 2) )
    {    
          ExpertGridObject.EG_numExpertInPage += 1;
          accumulated = ExpertGridObject.EG_height - ExpertGridObject.EG_navigationUnitHeight-1  ;           
    }      
}

function calcPadding(ExpertGridObject,noExperts)
{                
  
    //-1 is for the base of the grid          
    ExpertGridObject.EG_padding = accumulated - ExpertGridObject.EG_numExpertInPage*(ExpertGridObject.EG_expertUnitHeight+1) - 1;           
    if ( parseInt(ExpertGridObject.EG_CatID) > 0)   
    { 
       
        if (noExperts)
        {
            
           if (parseInt(ExpertGridObject.EG_paramID) ==8 ) 
           {
                ExpertGridObject.EG_padding = 0; 
           }
           else
           {
           ExpertGridObject.EG_padding = accumulated;
           }
             
        }       
        else if (getActualNumberExperts(ExpertGridObject)<ExpertGridObject.EG_numExpertInPage )
        {                   
            ExpertGridObject.EG_padding =  accumulated - (getActualNumberExperts(ExpertGridObject))*(ExpertGridObject.EG_expertUnitHeight+1) - 1;    
        }   
    } 
   
   if (ExpertGridObject.EG_padding<0)
       ExpertGridObject.EG_padding=0;    
 
    return ExpertGridObject.EG_padding;   
}


function getFooter500X618Navigation(ExpertGridObject)
{    
    if (ExpertGridObject.EG_paramID==1 || ExpertGridObject.EG_paramID==2)     
    {   
        return getNavigation(ExpertGridObject);
    }
    else
    { 
        return getNavigation2Lines(ExpertGridObject);
    }
    return getNavigation2Lines(ExpertGridObject);
}

function getFooter500X618WithText(ExpertGridObject)
{        
     
     var footerOutput ="";       
     footerOutput+=getNavigation(ExpertGridObject);
     footerOutput+=getFooter(ExpertGridObject,false);      
     
     return footerOutput;
}

function getFooter500X618NoText(ExpertGridObject)
{      
    var footerOutput ="";  
    if (ExpertGridObject.EG_paramID==1 || ExpertGridObject.EG_paramID==2)     
    {   
        footerOutput+=getNavigation(ExpertGridObject);
    }
    else
    { 
        footerOutput+=getNavigation2Lines(ExpertGridObject);
    }
    footerOutput+=getFooter(ExpertGridObject,true);
    return footerOutput;            
}
       
function getExpertRowsCommon(ExpertGridObject,expertPicStyle, expertItemStyle)
{                                                                                
   
    
    for(var i=0;i<ExpertGridObject.EG_numExpertInPage;i++)
        {
            var tdStyleFixed = getExpertUnitSize(ExpertGridObject)+ "; font-family:arial; font-size:11px; font-weight:bold; text-align:center;color:#"+ExpertGridObject.EG_textColor+";";
            var tdStyle;
            if (i%2==0)
            {
                tdStyle ="border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";"+ tdStyleFixed;
            }
            else
            {
                tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor2+";"+ tdStyleFixed;
            } 
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td valign='center'  style='" + tdStyle +"' >";
            ExpertGridObject.EG_expertsOutput+=       "<table width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\"  >";
            ExpertGridObject.EG_expertsOutput+=            "<tr>";
            ExpertGridObject.EG_expertsOutput+=                   "<td style='"+ expertPicStyle +"'>";
            ExpertGridObject.EG_expertsOutput+=                        "<img src='" + ExpertGridObject.EG_url +"/" + ExpertGridObject.EG_imageDefaultExpert + "' border='0'/>";
            ExpertGridObject.EG_expertsOutput+=                   "</td>";
            ExpertGridObject.EG_expertsOutput+=                   "<td style='"+ expertItemStyle +"'>"
            ExpertGridObject.EG_expertsOutput+=                        "Expert's name and description will appear here."
            ExpertGridObject.EG_expertsOutput+=                   "</td>"
            ExpertGridObject.EG_expertsOutput+=              "</tr>"                               
            ExpertGridObject.EG_expertsOutput+=        "</table>"                          
            ExpertGridObject.EG_expertsOutput+=   "</td>"
            ExpertGridObject.EG_expertsOutput+= "</tr>"
        }
}



function  getExpertRows1(ExpertGridObject)
{
    
    ExpertGridObject.EG_expertsOutput = "";
   
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px;";
    var expertItemStyle = "border-width:0px; text-align:left;";
    
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {
        getExpertRowsCommon(ExpertGridObject,expertPicStyle, expertItemStyle)
    }
    else
    {       
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
       
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,expertgrid.EG_id.length)        
        
        
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  =  expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic =  expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  =  expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  =  expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status =  expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee =  expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title =  expertgrid.EG_title[i];
                   
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 120);
                  
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);
            } 
            
            ExpertGridObject.EG_expertsOutput+= "\n<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='middle' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table width='100%'  cellpadding='0' cellspacing='0' border='0'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr>";
            ExpertGridObject.EG_expertsOutput+=                   "<td width='93'><table cellpadding='0' cellspacing='0' border='0'>";
            ExpertGridObject.EG_expertsOutput+=                           "<tr><td  width='93' height='93' valign='middle' align='center' nowrap>";
            ExpertGridObject.EG_expertsOutput+=                                   EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID);       
            ExpertGridObject.EG_expertsOutput+=                               "</td><td><img SRC='" + ExpertGridObject.EG_LP_Url +"/images/trans.gif' width='4'></td>";
            ExpertGridObject.EG_expertsOutput+=                   "</tr></table></td>";
            ExpertGridObject.EG_expertsOutput+=                   "<td><table cellpadding='0' cellspacing='0' border='0'>";
            ExpertGridObject.EG_expertsOutput+=                                       "<tr><td align='left'>";
            ExpertGridObject.EG_expertsOutput+=                                           EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,0);           
            ExpertGridObject.EG_expertsOutput+=                                       "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=                                       "<tr><td align='left'>";
            ExpertGridObject.EG_expertsOutput+=                                           EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,0);
            ExpertGridObject.EG_expertsOutput+=                                       "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=                                       "<tr><td style=''>";
            ExpertGridObject.EG_expertsOutput+=                                           EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description);
            ExpertGridObject.EG_expertsOutput+=                                       "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=                                     "</table>";
            ExpertGridObject.EG_expertsOutput+=                   "</td>";
            ExpertGridObject.EG_expertsOutput+=                   "<td width='132' align='center' style='PADDING-RIGHT: 4px; PADDING-LEFT: 4px; VISIBILITY: visible;'>";
            ExpertGridObject.EG_expertsOutput+=                       EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID);
            ExpertGridObject.EG_expertsOutput+=                       "<br>" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status);
            ExpertGridObject.EG_expertsOutput+=                   "</td>";
            ExpertGridObject.EG_expertsOutput+=              "</tr>" ;                              
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>\n";
	    }  
	    expertgrid = null;
    }          
}

function  getExpertRows2(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";
    
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px;";    
    var expertItemStyle = "border-width:0px; text-align:left;padding-left:4px;";
    
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {
       getExpertRowsCommon(ExpertGridObject,expertPicStyle, expertItemStyle)
    }
    else
    {
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage; 
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,expertgrid.EG_id.length);                        
                               
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 60);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);
            } 
            
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='middle' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' width='100%'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td rowspan='5'  width='69' height='69' valign='middle' align='center' nowrap>";
            ExpertGridObject.EG_expertsOutput+=                 EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID);       
            ExpertGridObject.EG_expertsOutput+=            "</td>"; 
            ExpertGridObject.EG_expertsOutput+=            "<td rowspan='5' colspan='2' width='3'></td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='left' colspan='2'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,0) + "</td></tr>";    
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='left' colspan='2'>" + EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,0) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='left' colspan='2'>" + EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description) + "</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=            "<tr><td style='padding-left:30px;'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td><td  align='left' valign='middle'>" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>";   
	    }   
    }    
}

function getExpertTextOnly(ExpertGridObject,expertPicStyle, expertItemStyle)
{
    textStyle="font-size:11px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
     
    ExpertGridObject.EG_expertsOutput+= "<tr>";
    ExpertGridObject.EG_expertsOutput+=   "<td style='"+ tdStyle + ";" + getExpertUnitSize(ExpertGridObject)+ ";' valign='center' align='center' >";
    ExpertGridObject.EG_expertsOutput+=      "Expert's name and description will appear here.";                      
    ExpertGridObject.EG_expertsOutput+=   "</td>";
    ExpertGridObject.EG_expertsOutput+= "</tr>"; 
}

function getExpertPictureOnly(ExpertGridObject,expertPicStyle, expertItemStyle)
{
    textStyle="font-size:11px;font-family:arial;font-weight:bold;color:#"+ExpertGridObject.EG_textColor+";";
    var tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + textStyle ;
     
    ExpertGridObject.EG_expertsOutput+= "<tr>";
    ExpertGridObject.EG_expertsOutput+=   "<td style='"+ tdStyle + ";" + getExpertUnitSize(ExpertGridObject)+ ";' valign='center' align='center' >";
    ExpertGridObject.EG_expertsOutput+=      "<img src='" + ExpertGridObject.EG_url + "/images/Affiliates/ExpertGrid/man63X69_1.gif'/>";                     
    ExpertGridObject.EG_expertsOutput+=   "</td>";
    ExpertGridObject.EG_expertsOutput+= "</tr>"; 
}

function  getExpertRows3Details(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px; ";
    var expertItemStyle = "border-width:0px; text-align:left;";
    
    if (parseInt(ExpertGridObject.EG_CatID)== 0) 
    {
        getExpertTextOnly(ExpertGridObject,expertPicStyle, expertItemStyle);
    }
    else
    {        
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        
        endPoint = Min(endPoint,expertgrid.EG_id.length)
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 20);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode =" border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject) ;
            }
            else
            {
                styleCode =" border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject) ;            
            } 
            
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='top' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' width='100%' height='100%'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1, 10) + "</td></tr>";    
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,1) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='left' style='padding-left:3px;'>" + EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description) + "</td></tr>";           
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "   "  + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>";   
	    } 
    }
}

function  getExpertRows3Picture(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px; ";
    var expertItemStyle = "border-width:0px; text-align:left;";
    
    if (parseInt(ExpertGridObject.EG_CatID)== 0) 
    {
        getExpertPictureOnly(ExpertGridObject,expertPicStyle, expertItemStyle);
    }
    else
    {    
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,expertgrid.EG_id.length);
        
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];

            var styleCode ="";
            if (i%2==0)
            {
                styleCode =" border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject) ;
            }
            else
            {
                styleCode =" border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject) ;            
            } 
    
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='top' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' width='100%'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1, 10) + "</td></tr>";               
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>"; 
        }
    } 
}

function getVerticalRows(ExpertGridObject,expertPicStyle, expertItemStyle)
{
    
    
    for(var i=0;i<ExpertGridObject.EG_numExpertInPage;i++)
        {
            var tdStyleFixed = getExpertUnitSize(ExpertGridObject)+ ";font-family:tahoma; font-size:15px; font-weight:bold; text-align:center;color:#"+ExpertGridObject.EG_textColor+";";
            
            var tdStyle;
            if (i%2==0)
            {
                tdStyle ="border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + tdStyleFixed;
            }
            else
            {
                tdStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor2+";" + tdStyleFixed;
            }             
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td valign='top'  style='" + tdStyle +"' >";
            ExpertGridObject.EG_expertsOutput+=       "<table  width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\"  >";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td height='12px'></td></tr>";            
            ExpertGridObject.EG_expertsOutput+=            "<tr>";
            ExpertGridObject.EG_expertsOutput+=                   "<td style='"+ expertPicStyle +"'>";
            ExpertGridObject.EG_expertsOutput+=                        "<img src='" + ExpertGridObject.EG_url +"/" + ExpertGridObject.EG_imageDefaultExpert + "' border='0'/>";
            ExpertGridObject.EG_expertsOutput+=                   "</td>";
            ExpertGridObject.EG_expertsOutput+=            "</tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr>";
            ExpertGridObject.EG_expertsOutput+=                   "<td style='"+ expertItemStyle +"'>"
            ExpertGridObject.EG_expertsOutput+=                        "Expert's name and description will appear here."
            ExpertGridObject.EG_expertsOutput+=                   "</td>"
            ExpertGridObject.EG_expertsOutput+=              "</tr>"                               
            ExpertGridObject.EG_expertsOutput+=        "</table>"                          
            ExpertGridObject.EG_expertsOutput+=   "</td>"
            ExpertGridObject.EG_expertsOutput+= "</tr>"
        }
}

function  getExpertRows4(ExpertGridObject)
{
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px; width:86px;";
    var expertItemStyle = "border-width:0px; text-align:left;padding-left:11px;"; 
    
    ExpertGridObject.EG_expertsOutput = ""
    if (parseInt(ExpertGridObject.EG_CatID)== 0) 
    {
        getVerticalRows(ExpertGridObject,expertPicStyle, expertItemStyle)
    }
    else
    {
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
                         endPoint = Min(endPoint,expertgrid.EG_id.length)
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 70);
            ExpertGridObject.EG_description = SplitLargeWord(ExpertGridObject,ExpertGridObject.EG_description,11);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);           
            } 
            
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='top' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' width='100%' height='100%'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1, 20) + "</td></tr>";    
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,0) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr>";
            ExpertGridObject.EG_expertsOutput+=                "<td  width='69' height='69' valign='middle' align='center' nowrap>" + EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID);  +"</td>";
            ExpertGridObject.EG_expertsOutput+=                "<td width='3'></td>";
            ExpertGridObject.EG_expertsOutput+=                "<td>" + EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description) + "</td>";
            ExpertGridObject.EG_expertsOutput+=            "</tr>"; 
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>";  
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>";   
	    } 
    }
}

function  getExpertRows5(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";
 
    var expertPicStyle = "text-align:left; padding-left:11px; ";
    var expertItemStyle = "text-align:center;"; 
       
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {
        getVerticalRows(ExpertGridObject,expertPicStyle, expertItemStyle)
    }
    else
    {
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
                        endPoint = Min(endPoint,expertgrid.EG_id.length)
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 80);
            ExpertGridObject.EG_description = SplitLargeWord(ExpertGridObject,ExpertGridObject.EG_description,18);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);           
            } 
            
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='top'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' height='100%'>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'  height='85' colspan='3'>" + EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID) + "</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1, 15) + "</td></tr>";    
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,1) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td colspan='3'>"+ EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center' colspan='3'>" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>";  
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>";   
	    } 
    }
    
}

function  getExpertRows6(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";
    
    var expertPicStyle = "text-align:center;";
    var expertItemStyle = "text-align:center;padding-top:10px";  
    
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {
         getVerticalRows(ExpertGridObject,expertPicStyle, expertItemStyle)
    }
    else
    {        
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,expertgrid.EG_id.length)        
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 50);
            ExpertGridObject.EG_description = SplitLargeWord(ExpertGridObject,ExpertGridObject.EG_description,18);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);       
            } 
            
            ExpertGridObject.EG_expertsOutput+= "<tr>";
            ExpertGridObject.EG_expertsOutput+=   "<td style='"+ styleCode + "' valign='top' align='left'>";
            ExpertGridObject.EG_expertsOutput+=       "<table cellpadding='0' cellspacing='0' width='100%' borde='1' height='99%'>";
            
            
            ExpertGridObject.EG_expertsOutput+=            "<tr><td  height='85' valign='middle' align='center' nowrap>" + EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID);  +"</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'  style='padding-top:0px! important;margin-top:0px! important;'>" + EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1,15) + "</td></tr>";    
            
            
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,1) + "</td></tr>";
            
            
            ExpertGridObject.EG_expertsOutput+=            "<tr><td style='padding-left:3px;'>"+ EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description) + "</td></tr>";
            
            
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=            "<tr><td align='center'>" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>";  
            ExpertGridObject.EG_expertsOutput+=        "</table>";                          
            ExpertGridObject.EG_expertsOutput+=   "</td>";
            ExpertGridObject.EG_expertsOutput+= "</tr>";   
	    }
    }
}

function getHeaderUnitSize(ExpertGridObject)
{
    return "width: "+ ExpertGridObject.EG_headerUnitWidth + "px;height:" + ExpertGridObject.EG_headerUnitHeight+"px";
}

function getExpertUnitSize(ExpertGridObject)
{
    var unitSize = "";
    //ExpertGridObject.EG_width - 2: 2 for the 2 pixels of the border
    if (parseInt(ExpertGridObject.EG_paramID) == 1)
    {
       unitSize = "height:" + ExpertGridObject.EG_expertUnitHeight +"px;width:" + (ExpertGridObject.EG_width - 2) +"px"; 
    }
    else
    {
        unitSize = "height:" + ExpertGridObject.EG_expertUnitHeight +"px;width:" + ExpertGridObject.EG_expertUnitWidth +"px";
    }
    return unitSize
}    


function getHeader728X90WithIcon(ExpertGridObject)
{
    var output="";
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    
    var URL = URLFormat(ExpertGridObject);
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }
    var SpecialOfferURL = ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID ;        
    var link = "<a style='font-family:tahoma;font-size:9px;border-width:0px;border-width:0px;  text-decoration:none;color:#"+ExpertGridObject.EG_titleColor+";' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' >Powered by <span style='font-family:arial black;font-size:9px;color:#"+ExpertGridObject.EG_titleColor+";'>LivePerson</span></a>"  
        
    output+="<td nowrap valign='top' style='line-height:1em;border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_headerBgColor+";"+ getHeaderUnitSize(ExpertGridObject) +"' align='center'><div><a  href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ SpecialOfferURL + "\")' style='text-decoration:none; border-width:0px;'><img  src=\"" + ExpertGridObject.EG_url + ExpertGridObject.EG_imageSpecialOffer + "\" /></a></div>";
    
    output+="<span>" + link + "</span>";
    output+="</td>";
    
    return output;
}

function getHeader728X90WithText(ExpertGridObject)
{  
    var headerTextStyle = "color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +";border-width:0px;text-decoration:" + ExpertGridObject.EG_titleUnderline + ";";
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    var categoryLink = "<a style='" + headerTextStyle +"' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID +"\")'>" + ExpertGridObject.EG_titleText + "</a>";
    var output="";
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;   

    var URL = URLFormat(ExpertGridObject);  
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }         
    var link = "<a style='border-width:0px;font-family:tahoma;font-size:9px;text-decoration:none;color:#"+ExpertGridObject.EG_titleColor+";' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' >Powered by <span style='font-family:arial black;font-size:9px;color:#"+ExpertGridObject.EG_titleColor+";'>LivePerson</span></a>"         
    
    output+="<tr><td style='border:1px solid #"+ExpertGridObject.EG_borderColor+";"+ getHeaderUnitSize(ExpertGridObject) + ";background-color:#"+ExpertGridObject.EG_headerBgColor+"' ><table style='" + getHeaderUnitSize(ExpertGridObject)+";' border='0' cellpadding='0' cellspacing='0' >";
    output+=          "<tr><td valign='center' style='border-width:1px;text-align:center;'>" + categoryLink +"</td></tr>";
    output+=          "</tr><td valign='bottom'><span>" + link + "</span><td></tr>";
    output+=          "</table></td>";
    return output;        
}

function  getExpertColumns1(ExpertGridObject)
{
    ExpertGridObject.EG_expertsOutput = "";    
    var expertPicStyle = "border-width:0px; text-align:left; padding-left:11px; width:86px;";
    var expertItemStyle = "border-width:0px; text-align:left;";
    
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {        
        
        for(var i=0;i<ExpertGridObject.EG_numExpertInPage;i++)
        {
            if (i%2==0)
            {
                ExpertGridObject.EG_expertsOutput+=   "<td valign='center'  style='border:1px solid #"+ExpertGridObject.EG_borderColor+";vertical-align:center;text-align:center;font-weight:bold;font-size:15px;font-family:tahoma;color:#"+ExpertGridObject.EG_textColor+";background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject) + "'  >";
                ExpertGridObject.EG_expertsOutput+=       "<table width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\"  >";
                ExpertGridObject.EG_expertsOutput+=            "<tr>";
                ExpertGridObject.EG_expertsOutput+=                   "<td style='" + expertPicStyle + "'>";
                ExpertGridObject.EG_expertsOutput+=                        "<img src='" + ExpertGridObject.EG_url +"/" + ExpertGridObject.EG_imageDefaultExpert + "' border='0'/>";
                ExpertGridObject.EG_expertsOutput+=                   "</td>";
                ExpertGridObject.EG_expertsOutput+=                   "<td style='border-width:0px;text-align:left;'>"
                ExpertGridObject.EG_expertsOutput+=                        "Expert's name and description will appear here."
                ExpertGridObject.EG_expertsOutput+=                   "</td>"
                ExpertGridObject.EG_expertsOutput+=              "</tr>"                               
                ExpertGridObject.EG_expertsOutput+=        "</table>"                          
                ExpertGridObject.EG_expertsOutput+=   "</td>"
            }
            else
            {
                ExpertGridObject.EG_expertsOutput+=   "<td valign=\"center\" style='border:1px solid #"+ExpertGridObject.EG_borderColor+";border-right-width:0px; vertical-align:center;text-align:center;font-weight:bold;font-size:15px;font-family:tahoma;color:#"+ExpertGridObject.EG_textColor+";background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject)+ "' >";
                ExpertGridObject.EG_expertsOutput+=       "<table width=\"100%\"  cellpadding=\"0\" cellspacing=\"0\"  >";
                ExpertGridObject.EG_expertsOutput+=            "<tr>";
                ExpertGridObject.EG_expertsOutput+=                   "<td style='" + expertPicStyle + "'>";
                ExpertGridObject.EG_expertsOutput+=                        "<img src='" + ExpertGridObject.EG_url +"/" + ExpertGridObject.EG_imageDefaultExpert + "' border='0'/>";
                ExpertGridObject.EG_expertsOutput+=                   "</td>";
                ExpertGridObject.EG_expertsOutput+=                   "<td style='border-width:0px;text-align:left;'>"
                ExpertGridObject.EG_expertsOutput+=                        "Expert's name and description will appear here."
                ExpertGridObject.EG_expertsOutput+=                   "</td>"
                ExpertGridObject.EG_expertsOutput+=              "</tr>"                               
                ExpertGridObject.EG_expertsOutput+=        "</table>"                          
                ExpertGridObject.EG_expertsOutput+=   "</td>"  
            }
        }
    }
    else
    {
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
                
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,ExpertGridObject.EG_totalNumOfExperts)    ;
    
        
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_fullName = cutString(ExpertGridObject,ExpertGridObject.EG_fullName, 20);
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 50);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+";border-right: none 0px; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject) 
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+";border-right: none 0px; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject) 
            } 
            
            ExpertGridObject.EG_expertsOutput+=   "<td valign='center' style='" + styleCode +"' >";
            ExpertGridObject.EG_expertsOutput+=       "<table width='100%' cellpadding='0' cellspacing='0'>";
            ExpertGridObject.EG_expertsOutput+=          "<tr><td rowspan='5'  width='88' height='88' valign='middle' align='center' nowrap>"
            ExpertGridObject.EG_expertsOutput+=                     EGgetExpertPicture(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_picID);            
            ExpertGridObject.EG_expertsOutput+=              "</td>";
            ExpertGridObject.EG_expertsOutput+=              "<td rowspan='5' width='1' colspan='2'></td></tr>";
            ExpertGridObject.EG_expertsOutput+=              "<td align='left' colspan='2'>";
            ExpertGridObject.EG_expertsOutput+=                   EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1);         
            ExpertGridObject.EG_expertsOutput+=           "</td></tr>"; 
            ExpertGridObject.EG_expertsOutput+=           "<tr><td align='left' colspan='2'>";
            ExpertGridObject.EG_expertsOutput+=                   EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,0);
            ExpertGridObject.EG_expertsOutput+=           "</td></tr>"
            ExpertGridObject.EG_expertsOutput+=           "<tr><td align='left' colspan='2'>";
            ExpertGridObject.EG_expertsOutput+=                    EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description);
            ExpertGridObject.EG_expertsOutput+=           "</td></tr>" ;
            ExpertGridObject.EG_expertsOutput+=           "<tr><td align='center'>" + EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td><td align='middle' align='left'>"  + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) + "</td></tr>";
            ExpertGridObject.EG_expertsOutput+=        "</table>";
            ExpertGridObject.EG_expertsOutput+=   "</td>"; 
	    }  
    }    
}

function getHeader468X60WithText(ExpertGridObject)
{
        var UniqeKey =   ExpertGridObject.EG_UniqeKey;
        var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
        var headerTextStyle = "color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +"; text-decoration:" + ExpertGridObject.EG_titleUnderline + ";";
        var categoryLink = "<span style='" + headerTextStyle +"'>" + ExpertGridObject.EG_titleText + "</span>";
        var header ="";
        header+=   "<td valign='center' style='border:1px solid #"+ExpertGridObject.EG_borderColor+"' >";
        header+=       "<table width='100%'   cellpadding='0' cellspacing='0'>"; 
        header+=        "<tr>"        
        header+=        "<td valign='top' style='text-align:center;cursor:pointer;border-right:1px solid #"+ExpertGridObject.EG_borderColor+";" + getHeaderUnitSize(ExpertGridObject)+ ";background-repeat:no-repeat; background-image:url("+ ExpertGridObject.EG_url + "/images/Affiliates/ExpertGrid/man191X60lpsn.JPG)' onclick='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID +"\")'>" + categoryLink + "</td>";         
        return header; 
}

function getHeader468X60NoText(ExpertGridObject)
{
        var UniqeKey =   ExpertGridObject.EG_UniqeKey;
        var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
        var header ="";
        header+=   "<td valign='center' style='border:1px solid #"+ExpertGridObject.EG_borderColor+"' >";
        header+=       "<table width='100%'   cellpadding='0' cellspacing='0'>"; 
        header+=        "<tr>"        
        header+=        "<td valign='top' style='border-right:1px solid #"+ExpertGridObject.EG_borderColor+";cursor:pointer;" + getHeaderUnitSize(ExpertGridObject)+ ";background-repeat:no-repeat; background-image:url("+ ExpertGridObject.EG_url + "/images/Affiliates/ExpertGrid/man191X60lpsn.JPG)' onclick='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/default.aspx\")'>&nbsp;</td>";         
        return header;
        
}

function  getExpertColumns2(ExpertGridObject)
{   
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    var headerTextStyle = "color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +"; text-decoration:" + ExpertGridObject.EG_titleUnderline + ";";
    var categoryLink = "<a style='" + headerTextStyle +"' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID +"\")'>" + ExpertGridObject.EG_titleText + "</a>";
    ExpertGridObject.EG_expertsOutput ="";     
    if (parseInt(ExpertGridObject.EG_CatID) == 0) 
    {                   
        //ExpertGridObject.EG_expertsOutput closes the html TR, Table, TD  that was started in the header function  Header468X60WithText or Header468X60NoText     
        ExpertGridObject.EG_expertsOutput+=    "<td style='width:" + ExpertGridObject.EG_expertUnitWidth + "px;background-color:#"+ExpertGridObject.EG_bgColor2+";color:#"+ExpertGridObject.EG_textColor+";' align='center'>Expert's name and description will appear here.</td>";
        ExpertGridObject.EG_expertsOutput+=        "</tr>";
        ExpertGridObject.EG_expertsOutput+=        "</table>";
        ExpertGridObject.EG_expertsOutput+=    "</td>";  
                  
	     
    }
    else
    {        
        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        
        var startPoint = (ExpertGridObject.EG_pageNumber-1) * ExpertGridObject.EG_numExpertInPage;
        
        var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
        endPoint = Min(endPoint,expertgrid.EG_id.length)
        for(var i=startPoint;i<endPoint;i++)
        {
            ExpertGridObject.EG_expID  = expertgrid.EG_id[i];
            ExpertGridObject.EG_fullName = expertgrid.EG_fullname[i];
            ExpertGridObject.EG_description  = expertgrid.EG_description[i];
            ExpertGridObject.EG_picID  = expertgrid.EG_picid[i];
            ExpertGridObject.EG_ratingPic  = expertgrid.EG_ratingpic[i];
            ExpertGridObject.EG_rating  = expertgrid.EG_rating[i];
            ExpertGridObject.EG_ratingNumber  = expertgrid.EG_ratersnumber[i];
            ExpertGridObject.EG_status  = expertgrid.EG_status[i];
            ExpertGridObject.EG_onlineFee  = expertgrid.EG_onlinefee[i];
            ExpertGridObject.EG_title  = expertgrid.EG_title[i];
            
            ExpertGridObject.EG_description = cutString(ExpertGridObject,ExpertGridObject.EG_description, 40);
            
            var styleCode ="";
            if (i%2==0)
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor1+";" + getExpertUnitSize(ExpertGridObject);
            }
            else
            {
                styleCode ="border:1px solid #"+ExpertGridObject.EG_borderColor+"; background-color:#"+ExpertGridObject.EG_bgColor2+";" + getExpertUnitSize(ExpertGridObject);
            }
            
            //ExpertGridObject.EG_expertsOutput closes the html TR, Table, TD  that was started in the header function  Header468X60WithText or Header468X60NoText     
            
            ExpertGridObject.EG_expertsOutput+= "<td style='height:" + ExpertGridObject.EG_expertUnitHeight + "px;width:" + ExpertGridObject.EG_expertUnitWidth + "px;background-color:#"+ExpertGridObject.EG_bgColor2+";color:#"+ExpertGridObject.EG_textColor+";' align='center'>";  
            ExpertGridObject.EG_expertsOutput+= EGgetExperName(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_fullName, ExpertGridObject.EG_title,1);
            ExpertGridObject.EG_expertsOutput+= EGgetExpertRating(ExpertGridObject,ExpertGridObject.EG_expID, ExpertGridObject.EG_rating, ExpertGridObject.EG_ratingPic, ExpertGridObject.EG_ratingNumber,0) +" " + EGgetExpertDescription(ExpertGridObject,ExpertGridObject.EG_description);
            ExpertGridObject.EG_expertsOutput+= "<table border=0 cellspacing=0 cellpadding=0><tr><td>"
            ExpertGridObject.EG_expertsOutput+= EGGetContactElement(ExpertGridObject,ExpertGridObject.EG_status, ExpertGridObject.EG_expID) + "</td>" ;
            ExpertGridObject.EG_expertsOutput+= "<td>&nbsp;" + EGgetonlineFee(ExpertGridObject,ExpertGridObject.EG_onlineFee, ExpertGridObject.EG_status) +" &nbsp;&nbsp;";
            
            
            if (parseInt(ExpertGridObject.EG_CatID) > 0)
            {
                ExpertGridObject.EG_expertsOutput +=    "&nbsp;&nbsp;&nbsp;&nbsp;";
                
                if (ExpertGridObject.EG_pageNumber==2 ||ExpertGridObject.EG_pageNumber==3)
                {   
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                    var PageNum = ExpertGridObject.EG_pageNumber;
                    ExpertGridObject.EG_expertsOutput +=    "<a style='font-family:tahoma; font-size:8px;' href='javascript:PreviousPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&lt;</a>&nbsp;&nbsp;";
                }
                else
                {
                    ExpertGridObject.EG_expertsOutput +=    "&nbsp;&nbsp;&nbsp;&nbsp;";
                }
                
                var expertgrid;
                if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
                {                    
                    expertgrid = ExpertGridObject.EG_RefToGrid;
                }  
                else
                {
                    expertgrid=document.getElementById('KasambaIframe').contentWindow;
                }
                
                if (ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage < expertgrid.EG_id.length && ExpertGridObject.EG_pageNumber<3)                              
                {
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                    var PageNum = ExpertGridObject.EG_pageNumber;
                    ExpertGridObject.EG_expertsOutput +=    "&nbsp;<a style='font-family:tahoma; font-size:10px;' href='javascript:NextPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&gt;</a>";              
                }
                else
                {  
                    if (ExpertGridObject.EG_ViewAllUrl!='')
                    {
                        var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                        var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                        ExpertGridObject.EG_expertsOutput +=    "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>See all&gt;</a>";             
                    }
                    else
                    {
                        ExpertGridObject.EG_expertsOutput +=    "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='' >See all&gt;</a>";             
                    }
                }
            }         
            ExpertGridObject.EG_expertsOutput+="</td></tr></table>"
            ExpertGridObject.EG_expertsOutput+="</td></tr>";
            ExpertGridObject.EG_expertsOutput+=        "</table>";
            ExpertGridObject.EG_expertsOutput+=   "</td>"; 
	    }  
    } 
}

function getFooter728X90(ExpertGridObject)
{       
    var column ="";                  
    column+= "<td valign=\"bottom\"  style='border:1px solid #"+ExpertGridObject.EG_borderColor+";background-color:#"+ExpertGridObject.EG_bgColor2+";border-left-width:0px; width:" + ExpertGridObject.EG_navigationUnitWidth +"px;height:"+ ExpertGridObject.EG_navigationUnitHeight + ";'  nowrap>" 
    if (parseInt(ExpertGridObject.EG_CatID) > 0)
    {
        if (ExpertGridObject.EG_pageNumber==2 ||ExpertGridObject.EG_pageNumber==3)
        {
            var UniqeKey =   ExpertGridObject.EG_UniqeKey;
            var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
            var PageNum = ExpertGridObject.EG_pageNumber;
            column+=    "<a style='color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:PreviousPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&lt;</a>&nbsp;&nbsp;";
        }
        else
        {
         column+=    "&nbsp;&nbsp;&nbsp;&nbsp;";
        }

        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
       
        if (ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage < ExpertGridObject.EG_totalNumOfExperts&& ExpertGridObject.EG_pageNumber<3)
        {
            var UniqeKey =   ExpertGridObject.EG_UniqeKey;
            var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
            var PageNum = ExpertGridObject.EG_pageNumber;
            column+=    "<a style='color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:NextPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&gt;</a>";              
        }
        else
        {   
            if (ExpertGridObject.EG_ViewAllUrl!='')
            {
                var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                column+=    "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>See all</a>";             
            } 
            else
            {
                column+=    "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href=''>See all</a>";             
            }
        }
    }
    column+= "</td>";
    
    return column
}

function getFooter125X125(ExpertGridObject)
{
    var  navigation="";
    
    var  navigationStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";height:" + ExpertGridObject.EG_navigationUnitHeight + "px; background-color:#"+ExpertGridObject.EG_bgColor2+";width:1125px";
    
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;   
    var URL = URLFormat(ExpertGridObject);
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }
    var link = "<a style='line-height: 11px;color:#"+ExpertGridObject.EG_screenNameColor+"; font-family:tahoma; font-size:8px;border-width:0px;text-decoration:none;' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' >Powered by <span style='line-height: 11px;font-family:arial black; font-size:8px;'>LivePerson</span></a>";  
  
    navigation+= "<tr>"
    navigation+=    "<td  style='" + navigationStyle + "' align='center' >";   
    if ((parseInt(ExpertGridObject.EG_CatID) > 0)&& (ExpertGridObject.EG_profileMode=='Wizard'))
    {
       var UniqeKey =   ExpertGridObject.EG_UniqeKey;
       var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;                     
       navigation+=  "<div><a style='line-height: 8px;font-family:tahoma; font-size:8px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'> View all experts</a></div>"
       
    }       
    navigation+=         link;            
    navigation+=     "</td>";
    navigation+= "</tr>";      
    
    return navigation;      
}

function getPadding(ExpertGridObject,paddingHeight)
{

    var padding = "";
    padding = "<tr>";          
    padding+="<td style='border:1px solid #"+ExpertGridObject.EG_borderColor+";height:" + paddingHeight + "px'>";    
    padding+="</td></tr>";   
  
    return padding;     

}

function getHeader500X618WithText(ExpertGridObject)
{  
    var header ="" 
    var headerStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";" + getHeaderUnitSize(ExpertGridObject) + "; background-color:#"+ExpertGridObject.EG_headerBgColor+";text-align:center; border-width:1px;";
    var headerTextStyle = "color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +";border-width:0px; text-decoration:" + ExpertGridObject.EG_titleUnderline + ";";
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    var categoryLink = "<a style='" + headerTextStyle +"' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID +"\")'>" + ExpertGridObject.EG_titleText + "</a>";
    
    header+= "<tr><td  style='" + headerStyle + "'>";   
    header+= categoryLink;
    if ((parseInt(ExpertGridObject.EG_paramID) == 1) || (parseInt(ExpertGridObject.EG_paramID) == 2))
    {
          var subtitleStyle = "color:#"+ExpertGridObject.EG_subtitleColor+"; font-family:" + ExpertGridObject.EG_subtitleFontFamily + "; font-size:" + ExpertGridObject.EG_subtitleFontSize +"; font-style:"+ ExpertGridObject.EG_subtitleItalic +"; font-weight:" + ExpertGridObject.EG_subtitleBold +"; text-decoration:" + ExpertGridObject.EG_subtitleUnderline + ";" ;
          header+= "<br/><span style='" + subtitleStyle + "'>" + ExpertGridObject.EG_subtitleText;
    } 
    
    header+= "</td></tr>"; 
     
    return header;                   
}


function getHeader500X618NoText(ExpertGridObject)
    {
    var header = "";
    var headerStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";" + getHeaderUnitSize(ExpertGridObject) + "; background-color:#"+ExpertGridObject.EG_headerBgColor+"; color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +"; text-decoration:" + ExpertGridObject.EG_titleUnderline + "; text-align:center; border-width:1px;";
    header = "<tr>";          
         
    header+="<td  style='" + headerStyle + "'>&nbsp;";   
    header+="</td></tr>";   
  
    return header;                    
}

function getHeader120X600WithIcon(ExpertGridObject)
{   
     var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
    var header = "";
    var headerStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";" + getHeaderUnitSize(ExpertGridObject) + ";";
    var SpecialOfferURL = ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID ;
    header = "<tr>";          
   
    header+="<td  style='" + headerStyle + "'>";
     
    header+="<a  href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ SpecialOfferURL + "\")' style='text-decoration:none; border-width:0px;'><img src=\"" + ExpertGridObject.EG_url + ExpertGridObject.EG_imageSpecialOffer + "\" border=\"0\" /></a>";                  
         
    header+="</td></tr>";   
  
    return header;                    
}

function getNavigationColor(ExpertGridObject)
{
    var navigationColor = ExpertGridObject.EG_bgColor2;
    if (ExpertGridObject.EG_numExpertInPage%2 == 0)
    {
        navigationColor = ExpertGridObject.EG_bgColor1;
    }   
     return navigationColor;
}

function getFooterBgColor(ExpertGridObject)
{
    var footerBgColor = ExpertGridObject.EG_bgColor1;
    if (ExpertGridObject.EG_numExpertInPage%2 == 0)
    {
        footerBgColor = ExpertGridObject.EG_bgColor2;
    }   
     return footerBgColor;
}

function getNavigation(ExpertGridObject)
{      
    var navigationColor = getNavigationColor(ExpertGridObject);
    var navigation="";
    var navigationStyle = "height:" + ExpertGridObject.EG_navigationUnitHeight + "px; background-color:#"+navigationColor+";font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor;
    var logoStyle = "display:inline;font-family:arial black; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor;
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey; 
    
    var URL = URLFormat(ExpertGridObject);
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }
                     
    var link = "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor +";border-width:0px;text-decoration:none;' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' nowrap>Powered by <span style='" +logoStyle + "'>LivePerson</span></a>";       
    
    navigation+= "<tr><td style='border:1px #"+ ExpertGridObject.EG_borderColor+ " solid'>\n<table width='100%' cellpadding='0' cellspacing='0'><tr>"
    if (parseInt(ExpertGridObject.EG_CatID) > 0)
    {
        if ((ExpertGridObject.EG_pageNumber==2 ||ExpertGridObject.EG_pageNumber==3)&&ExpertGridObject.EG_paramID!=8)
        {
            var PageNum = ExpertGridObject.EG_pageNumber;                        
            navigation+=    "<td  width='70' style='" + navigationStyle + "' align='center' >&nbsp;<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:PreviousPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&lt;&lt;Previous</a></td>";              
        }
        else 
        {            
            navigation+=    "<td width='70' style='" + navigationStyle + "'>&nbsp;</td>"
        }
    }

    navigation+=    "<td  style='" + navigationStyle + "' align='center' >";          
    navigation+=         link;            
    navigation+=    "</td>";

    if (parseInt(ExpertGridObject.EG_CatID) > 0)
    {

        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
     
        if (ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage < ExpertGridObject.EG_totalNumOfExperts && ExpertGridObject.EG_pageNumber<3 && ExpertGridObject.EG_paramID!=8)
        {
            var UniqeKey =   ExpertGridObject.EG_UniqeKey;
            var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
            var PageNum = ExpertGridObject.EG_pageNumber;
            navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:NextPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>Next&gt;&gt;</a>&nbsp;</td>";              
        }
        else
        {  
       
            if ((ExpertGridObject.EG_ViewAllUrl!='')&&(ExpertGridObject.EG_profileMode=='Wizard'))
            {
                var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>View all experts</a></td>";             
            }
            else if (ExpertGridObject.EG_profileMode=='Wizard')
            {
                navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";'>View all experts</a></td>";             
            }   
            else
            {
                navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ></td>";             
            }
        }
    }
    navigation+= "</tr></td></table>\n</tr>";      
    
    return navigation;            
}

function getNavigation2Lines(ExpertGridObject)
{   
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;    
    var navigationColor = getNavigationColor(ExpertGridObject);
    var navigation="";    //height:" + ExpertGridObject.EG_navigationUnitHeight + "px;
    
    
    var navigationStyle = "line-height: 1.5em; background-color:#"+navigationColor+";font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor;
    
    
    var logoStyle = "line-height: 1em;font-family:arial black; font-size:9px;color:#"+ExpertGridObject.EG_screenNameColor;
    
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }
    
    var URL = URLFormat(ExpertGridObject);  
    var link = "<a style='line-height: 1.5em;font-family:tahoma; font-size:9px;color:#"+ExpertGridObject.EG_screenNameColor +";border-width:0px;text-decoration:none;' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' >Powered by <span style='" +logoStyle + "'>LivePerson</span></a>";       
    
    navigation+= "<tr><td style='border:1px #"+ ExpertGridObject.EG_borderColor+ " solid'>\n<table width='100%' cellpadding='0' cellspacing='0' style='height:" + ExpertGridObject.EG_navigationUnitHeight + "px;'><tr>"
    if (parseInt(ExpertGridObject.EG_CatID) > 0)
    {
        //8 doesnt need next and back
        if (ExpertGridObject.EG_paramID!=8)  
        {
            //handle back
            if (ExpertGridObject.EG_pageNumber==2 ||ExpertGridObject.EG_pageNumber==3)
            {
                var PageNum = ExpertGridObject.EG_pageNumber;
                navigation+=    "<td  width='70' style='" + navigationStyle + "' align='center' >&nbsp;<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:PreviousPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&lt;&lt;Previous</a></td>";              
                
            }
            else 
            {               
                navigation+=    "<td width='70' style='" + navigationStyle + "'>&nbsp;</td>"
            }
        }

        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }

        if (ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage < ExpertGridObject.EG_totalNumOfExperts && ExpertGridObject.EG_pageNumber<3 && ExpertGridObject.EG_paramID!=8)
        {
            //handle next
            var UniqeKey =   ExpertGridObject.EG_UniqeKey;
            var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
            var PageNum = ExpertGridObject.EG_pageNumber;
            navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:NextPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>Next&gt;&gt;</a>&nbsp;</td>";              
        }
        else
        {   
            //handle view all
            if (ExpertGridObject.EG_ViewAllUrl!='')
            {
                //in 6 and 7 are shorter so we omit the word 'expert'
                if (ExpertGridObject.EG_paramID==6)
                {
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                    navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>View all</a></td>";             
                }
                else if (ExpertGridObject.EG_paramID==7)
                {
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
                    navigation+=    "<td width='90' style='" + navigationStyle + "' align='center'><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>View all</a></td>";             
                }
                else
                {
                    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
                    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;   
                    if (ExpertGridObject.EG_profileMode=='Wizard')                                 
                        navigation+=    "<td width='100%' nowrap style='line-height:13px! important," + navigationStyle + "' align='center'><a style='line-height:13px! important,font-family:tahoma; font-size:9px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>View all experts</a></td>";             
                    
                }
            }
            else
            {   
                if (ExpertGridObject.EG_profileMode=='Wizard')                
                 navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";'>View all experts</a></td>";             
            }   
        }
    }
    navigation+= "</tr><tr>"
    navigation+=    "<td colspan='2' style='" + navigationStyle + "' align='center' >";          
    navigation+=         link;            
    navigation+=    "</td></tr></table>\n</td></tr>";      
    
    return navigation;            
}

function getNavigation4(ExpertGridObject)
{    
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;
    var navigationColor = getNavigationColor(ExpertGridObject);
    var navigation="";
    var navigationStyle = "height:" + ExpertGridObject.EG_navigationUnitHeight + "px; background-color:#"+navigationColor+";font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor;
    var logoStyle = "font-family:arial black; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor;  
    var URL = URLFormat(ExpertGridObject);
    if (ExpertGridObject.EG_CategoryName==null)                
    {
        ExpertGridObject.EG_CategoryName ="";
    }
    var link = "<a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";border-width:0px;text-decoration:none;' title='" + ExpertGridObject.EG_CategoryName + "' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ URL + "\")' >Powered by <span style='" + logoStyle +"'>LivePerson</span></a>";
    
      
    navigation+= "<tr><td style='border:1px #"+ ExpertGridObject.EG_borderColor+ " solid'><table width='100%' cellpadding='0' cellspacing='0' ><tr>"
    
    if (parseInt(ExpertGridObject.EG_CatID) > 0)
    {
        if (ExpertGridObject.EG_pageNumber==2 ||ExpertGridObject.EG_pageNumber==3)
        {
            var PageNum = ExpertGridObject.EG_pageNumber;
            navigation+=    "<td style='font-family:tahoma; font-size:10px;' width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:PreviousPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>&lt;&lt;Previous</a></td>";              
        }
        else 
        {
            navigation+=    "<td style='font-family:tahoma; font-size:10px;' width='90' style='" + navigationStyle + "'>&nbsp;</td>"
        }

        var expertgrid;
        if (typeof(ExpertGridObject.EG_Disable_Render) == 'undefined')
        {
            expertgrid = ExpertGridObject.EG_RefToGrid;            
        }  
        else
        {
            expertgrid=document.getElementById('KasambaIframe').contentWindow;
        }
        
        if (ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage < expertgrid.EG_id.length && ExpertGridObject.EG_pageNumber<3)
        {
            var PageNum = ExpertGridObject.EG_pageNumber;
            navigation+= "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:NextPage(" + PageNum + "," + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'>Next&gt;&gt;</a></td>";              
        }
        
        else
        {   
            if (ExpertGridObject.EG_ViewAllUrl!='')
            {
                navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href='javascript:ViewAllExperts(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ")'> View all</a></td>";             
            }
            else
            {
                navigation+=    "<td width='90' style='" + navigationStyle + "' align='center' ><a style='font-family:tahoma; font-size:10px;color:#"+ExpertGridObject.EG_screenNameColor+";' href=''> View all</a></td>";             
            }
        }
        navigation+= "</tr><tr>"
    }   
    
    navigation+=    "<td  style='" + navigationStyle + "' align='center' colspan='2'>";          
    navigation+=        link;            
    navigation+=    "</td>";
    navigation+= "</tr></td></table></tr>";  
    
    return navigation;            
}

function getFooter(ExpertGridObject,empty)
{   
    var footerBgColor = getFooterBgColor(ExpertGridObject)
    var footer="";
    var footerStyle = "border:1px solid #"+ExpertGridObject.EG_borderColor+";height:" + ExpertGridObject.EG_footerUnitHeight + "px; font-family:"+ ExpertGridObject.EG_footerFontFamily +";font-size:"+ ExpertGridObject.EG_footerFontSize +";font-style:"+ ExpertGridObject.EG_footerItalic +"; font-weight:" + ExpertGridObject.EG_footerBold +"; text-decoration:" + ExpertGridObject.EG_footerUnderline +";text-align:center;color:#"+ExpertGridObject.EG_footerColor+";background-color:#"+footerBgColor+";";
             
    if (parseInt(ExpertGridObject.EG_footerUnitHeight) > 0)
    {
        footer+= "<tr>";  
        if (!empty)
        {
            footer+=    "<td style='" + footerStyle + "'>" + ExpertGridObject.EG_footerText +"</td>";
        }
        else
        {
            footer+=    "<td  style='" + footerStyle + "'>&nbsp;</td>";
        }
            
        footer+= "</tr>"; 
    }   
    
    return footer
}

function getHeader500X618TextWithIcon(ExpertGridObject)
{   
    var UniqeKey =   ExpertGridObject.EG_UniqeKey;
    var EG_ExpertGridShortCodeUniqeKey =  ExpertGridObject.EG_ExpertGridShortCodeUniqeKey;   
    var SpecialOfferURL  = ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID ;
    var header ="" 
    var headerLeftStyle = "width:100%; background-color:#"+ExpertGridObject.EG_headerBgColor+"; text-align:center; border-width:0px;" ;        
    var headerTextStyle = "color:#"+ExpertGridObject.EG_titleColor+"; font-family:" + ExpertGridObject.EG_titleFontFamily + "; font-size:" + ExpertGridObject.EG_titleFontSize +"; font-style:"+ ExpertGridObject.EG_titleItalic +"; font-weight:" + ExpertGridObject.EG_titleBold +"; border-width:0px; text-decoration:" + ExpertGridObject.EG_titleUnderline + ";";    
    var categoryLink = "<a style='" + headerTextStyle +"' href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\"" + ExpertGridObject.EG_LP_Url +"/Categories/ViewCategory.aspx?CatID=" + ExpertGridObject.EG_CatID +"\")'>" + ExpertGridObject.EG_titleText + "</a>";
    var headerRightStyle = "background-color:#"+ExpertGridObject.EG_headerBgColor+"; border-width:0px; text-align:right;";
    var subtitleStyle = "width:100%; background-color:#"+ExpertGridObject.EG_headerBgColor+"; color:#"+ExpertGridObject.EG_subtitleColor+"; font-family:" + ExpertGridObject.EG_subtitleFontFamily + "; font-size:" + ExpertGridObject.EG_subtitleFontSize +"; font-style:"+ ExpertGridObject.EG_subtitleItalic +"; font-weight:" + ExpertGridObject.EG_subtitleBold +"; text-decoration:" + ExpertGridObject.EG_subtitleUnderline + "; text-align:center; border-width:0px;" ;
    header = "<tr>";
    header+= "<td  style='border:1px solid #"+ExpertGridObject.EG_borderColor+";height:" + ExpertGridObject.EG_headerUnitHeight + "px'>\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"
    header+= "<tr>";
    header+= "<td style='" + headerLeftStyle +"'>" + categoryLink +"</td>";
    header+= "<td style='" + headerRightStyle +"' rowspan='2'><a  href='javascript:setHref(" + UniqeKey + "," + EG_ExpertGridShortCodeUniqeKey + ",\""+ SpecialOfferURL + "\")' style='text-decoration:none; border-width:0px;'><img src=\"" + ExpertGridObject.EG_url + ExpertGridObject.EG_imageSpecialOffer + "\" border=\"0\" /></a></td></tr>";
    header+= "<tr><td style='" + subtitleStyle +"'>" + ExpertGridObject.EG_subtitleText + "</td></tr>";
    header+= "</table>\n</td></tr>";    
        
    return header;     
}      

function getActualNumberExperts(ExpertGridObject)
{ 
    var startPoint = (ExpertGridObject.EG_pageNumber-1) *ExpertGridObject.EG_numExpertInPage;    
    var endPoint = ExpertGridObject.EG_pageNumber * ExpertGridObject.EG_numExpertInPage;
    endPoint = Min(endPoint,ExpertGridObject.EG_totalNumOfExperts)        
    
    return endPoint-startPoint;
}


function cutString(ExpertGridObject,stringToCut, numOfChars)  
{
    if (stringToCut.length > numOfChars)
    {
        stringToCut = stringToCut.substr(0,numOfChars) 
        stringToCut += "...";      
    }
    return  stringToCut;
}                                                                                                         

function NextPage(PageNum,UniqeKey,EG_ExpertGridShortCodeUniqeKey)
{ 
   var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
   var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
        
    }
  
    if (PageNum<3)
    {
        ExpertGridObject.EG_pageNumber= parseInt(PageNum)+1;
    }
    EGrender(ExpertGridObject,ExpertGridObject.EG_RefToGrid);
}

function PreviousPage(PageNum,UniqeKey,EG_ExpertGridShortCodeUniqeKey)
{
    var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
    var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
        
    }
    
    ExpertGridObject.EG_pageNumber= parseInt(PageNum)-1;
    EGrenderData(ExpertGridObject,ExpertGridObject.EG_RefToGrid);
}


function ViewAllExperts(UniqeKey,EG_ExpertGridShortCodeUniqeKey)
{
    var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
    var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
    }
    setHref(UniqeKey,EG_ExpertGridShortCodeUniqeKey,ExpertGridObject.EG_LP_Url + ExpertGridObject.EG_ViewAllUrl);
} 

function Min(num1,num2)
{
    if (num1>num2)
    {
        return num2;
    }
    else
    { 
        return num1;
    }
}

//this function clears the three titles of the grid. It is called when we change a category
function ClearTitles(ExpertGridObject)
{
    ExpertGridObject.EG_titleText = 'Text for Header'
    ExpertGridObject.EG_subtitleText = ''
    ExpertGridObject.EG_footerText = 'Text for Footer'
}

//this function add fm=yes where needed and restOfParams to the url
function setHref(UniqeKey,EG_ExpertGridShortCodeUniqeKey,url)
{
    var strWizardParam = "var WizardParam =  new " + EG_ExpertGridShortCodeUniqeKey + "();\n"
    var strExpertGridObject = "var ExpertGridObject = " + "new "+UniqeKey+"()";
   
   
    if (typeof(ExpertGridObject) == 'undefined')
    {
        eval (strWizardParam); 
        eval (strExpertGridObject);                
    }
    
    
    var delimeter = "?";
    if (url.indexOf("?") >= 0)
    {
       delimeter = "&"; 
    }
   
    if(parseInt(ExpertGridObject.EG_specialOfferType)==2)
    {
        url += delimeter + "fm=yes";
        if (delimeter == "?")
        {
            delimeter = "&";
        }
    } 
    
    
    url += delimeter + "twid=2";
    
    if (ExpertGridObject.EG_params != "")
    {
       url += delimeter + ExpertGridObject.EG_params;
       
       if (ExpertGridObject.EG_AffliateID == 'CJ')
       {
            url = "http://www.jdoqocy.com/click-" + ExpertGridObject.EG_PID + "-" 
                  + ExpertGridObject.EG_AID + "?URL=" + escape(url + "&accountRef=liveperson");
       } 
    }     
    window.open(url)
}

function SplitLargeWord(ExpertGridObject,str,MaxWordLen)
{
    var arr = str.split(" ");
    var result = "";

    for (i = 0; i < arr.length; i++)
    {
        if (i > 0)
            result += " ";
        if (arr[i].length > MaxWordLen)
            result += arr[i].substring(0,MaxWordLen) + " " + arr[i].substring(MaxWordLen);
        else
            result += arr[i];
    }
    return result;         
}

function GetSortByValue(ExpertGridObject)
{
    //he default SortBy option for all categories except Spirituality is 9. for Spirituality & Religion it should be 10.
    if (ExpertGridObject.EG_MainCatID == 1119)
    {
        return 10;
    }
    else
    {
        return 9;
    }
}

function URLFormat(ExpertGridObject)
{
     var URL = ExpertGridObject.EG_SubDomainURL;
     
     /*
     if (ExpertGridObject.EG_params != "")
        URL+="/?"+ExpertGridObject.EG_params;         
     */
     
     if (ExpertGridObject.EG_profileMode == 'SingleExpertSelection')
     {
         URL+="/?ExpID="+ ExpertGridObject.EG_expID;    
     }
     
     
     
 return URL       
 }
