function WizardParamEG1973c25795dd4735934b3dac99e1b04a()
{
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://Psychics.liveperson.com';
this.EG_CategoryName='Astrology';
this.EG_expertsOutput = "";this.EG_phoneEnabled = false;this.EG_NextShowPicture = false;this.EG_125X125TimerRunning = false;this.EG_125X125RefreshTime = 3000;this.EG_UniqeKey = "WizardParamEG1973c25795dd4735934b3dac99e1b04a";
this.EG_ExpertGridShortCodeUniqeKey = "EG1973c25795dd4735934b3dac99e1b04a" ;
this.EG_RefToGrid = new KasambaExpertsGrid_WizardParamEG1973c25795dd4735934b3dac99e1b04a();
this.EG_ExpertGridDiv = "EG1973c25795dd4735934b3dac99e1b04a" ;
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_WizardParamEG1973c25795dd4735934b3dac99e1b04a()
{
this.EG_id = new Array("350440","761797","838784","321462","429877","194118","310053","714989","962259","342536","583837","843458","698418","1032591","789608","791895","468011","1052306","828795","1060824","191976","123174","220470","863379","942729","733068","204861","1070845","122722","155519","594026","688069","563832","138005","65196","777279","425808","454362","68615","43541","96636","541382","97810","187645","641709");
this.EG_fullname = new Array("Psychic Maestro","Love Psychic Delphi","Psychic Love Guru 7","Astro Deep","Fassu..","SHARAD KUMAR SONI","Sophie Reunite lovers","Vibrant Spirit","Eternal Insights","Psychic Maheen","Spiritual N Healing Touch","Genuine Love Readings","Spiritual Love VIBES","Astrohost","Takla","Love Psychic Indi","Master Spiritual","Mukesh -The AstroHealer","Eternity Coach Alisha","Love-Relationship consults","Psychic Vision by MaryBeth","Enlightenment from Lucia","Alka Vijh","PSYCHIC EXPERT SYLVIA","Powerful Psychic Vision","Celeste Leone","WIZARD Z","Acharya Anupam Jolly","Readings By LadyButterfly","Miss Watson","TRUE REFLECTIONS BY SIMONE","psychic healer Leia","Love,Soulmate","PSYCHIC ADVISOR EVE","Psychic Advisor Dr. Singh","Love Psychic Sid","Master Psychic Ann Ross","CLAIRVOYANT CLAIRE","A Psychic Friend","Anne Maclean","Psychic Readings by Dove","Magic of Maiara","badzodiac psy astrologer","StarShadow","World Spiritual Expert");
this.EG_description = new Array("~ 2010 SPECIAL PRICE ~World Renowned ** 5 Stars ** Genuine Spiritual Master with 100% Truth and 99 %Accurate Insight on Career & Love.","Astrology to help you know which dates are important and which ones are to be careful of A lot can be said a lot can be done, a lot can be heard but when in need, there is no.","Specializing in Astrology over 17 years experience.Find out what your stars say for you today.","Know about your love life or life in general.Are you unsure about your lovers feelings.love,health career,sex,business related problems. only the truth.....","I am well versed astrologer,able to offer you astrological compatible charts,reports for you and for your love ones call now and check out..........","[15+ Years Experience] I am here visible the things that hard to be visible & Answer the questions that hard to Answered with the help of astrology And give accurate time fram","Guiding you as you walk your life’s path with a Love, Life, Money or Business Related Reading. I have successfully given over 5,000 Psychic Readings!","I can answer your concerns that you are looking for with Accurate and Honest what your stars tell you about with no sugar coating","I will let you know what is in stored for your life with my ability and guidance....accurate answers, fast type...","*99.9%  Accurate* Clairvoyant* Honest* Experinced* Non-Judgemental* Free connection time* Reading through Astrology, Clairvoyance, Spirit guides, Tarot & Crystal.","Astrology comparability,find out your strengths and control your destiny by knowing what lies ahead,love relationships, including,sex, dating,cheating future.","Want to know the truth of your love?? What your stars would say with the help of my wonderful guides and angels and let you know the truth with my knowledge in Astrology.","Call to find out what the stars say about you through my psychic astrology!!","DISCOUNT PRICE - Astro-Psychic Adviser, Scientific Analysis, Accurate Reading, Fortune Maker, Expert in Love,Relation,Marriage, Job & Health.","astrology and numerlogy chart reader, vedic chart and natal, dasa chart for your life matters, call me today....","psychic and astrology readings by INDI, very detailed 100% accurate, Vedic birth chart reader","**A Honest ! True ! & Genuine! Psychic Reader** I am here to guide you in all aspects of life. I am also Empathic, and can sometimes feel ur sadness, pain or happiness.","Let's Know what your Stars hold for you? Excellent Healer, Fast Connection, True and In-depth Reading on Love Life, Career, Health and all aspect of life.","Let me be your love & life coach and guide you with my skills in astrology!  $2.99 for Return Clients! HURRY!","I devote my time helping people, resolving their lives issues and help them finding the abundance of love, happiness and success.","The answers and guidance you will receive will be accurate and honest with my psychic and astrology reading.Why wonder allow me to guide you to the true answers you seek","Wonder what the stars hold for you or how you match up? I'm a naturally gifted Empathic psychic with 15 years of experience! Here to help you find the truth in your future!","Seeking advice from a certified professional astrologer experienced for more than 15 years. Here you can approach for your own personal and friendly astrologer.","Gifted Psychic Can Help You With All Problems .Fast and Accurate - Truthful Answers. I have been psychic & Astrologer for years now with great Accuracy.","Astrology readings to help in all matter.You can ask me questions in astrology reading,love & relationship,marriage and career.","I can read energies around people and help them to attain clarity they need without judgement.","Highly  Accurate Natal Charts and Transits. Star Master  and Witch. Call Me Now.","Expert advice on Vedic Astrology, Vastu and Gems. Authentic and learned astrologer from India.","Advice in Love. Intimacy.  Money.  Health.Relationship. Business.  Marriage  and  Pets. Let me tell You what the Future holds for you! Contact me now!","Over 3000 satisfied clients. Call now, & see what's in store for you in 2010! Love, Money, Relationships, Career, Happiness.","Decisions are confusing and I will provide the much needed astrological advice to steer your life in the right direction.","astrology readings on the future call now.....","Stars predict future. Want to know what your future holds for you? Allow me to guide you to the correct aspects of life and to attain successful future.","Astrology Horoscope Love Compatibility Readings. Find out if the one you&#39;re with is right for you. 25 years of experience","One Year day by day Predictions for $45.I do Psychic reading,Tarots, Clairvoyance, I Advice on Lucky numbers, Matching, Relationships, Marriage& Divorce and healing Spells.","Natural Psychic, using tarot and astrology as my tools for giving you the best advice and insight possible!","Accurate forcasts and horoscopes.Want to know what the stars and future hold for you,find your love partner today.Honest and sincere.","ALL READINGS ARE LESS THEN 7 MINUTES GUARANTEED! Everyone has a differnt Astrology sign, let me answer your questions by allowing you to understand thier true meanings...","Affordable Astrology Reading, for today Economy. That's Quick to address your question in Love,Relationship & more","I connect directly with universal consciousness energy patterns.. I have your answers FAST and accurate!","Honest Answers, Advice and Insights from an Expert Reader and Gifted Spiritual Counselor -  Call Today for a True Psychic Connection with Dove.","**ASTROLOGY** Expert Readings on Sun Signs, Forecasts, Daily Horoscope Readings, and Advice.LET ME GUIDE YOU*BLESSINGS*Will Connect 1st","psychic astrology: 30+ years i&#39;ve helped people with questions on romance, life choices, money, business, health, and have solved crime mysteries.","I am a psychic Tarot card reader and Astrologer. I also teach classes in Tarot Reading, Astrology, Aromatherapy, and Reiki","I am here to help you in all problems of your life, love, career, relationship, marriage--time frame, clarivoyant and no sugarcoating!!!");
this.EG_picid = new Array("350440","761797","838784","321462","429877","194118","310053","714989","962259","342536","583837","843458","698418","1032591","789608","791895","468011","1052306","828795","1060824","191976","123174","220470","863379","942729","733068","204861","1070845","122722","155519","594026","688069","563832","138005","65196","777279","425808","454362","68615","43541","96636","541382","97810","187645","641709");
this.EG_ratingpic = new Array("9","9","9","9","9","9","9","10","10","10","10","9","9","10","9","9","8","10","10","8","9","9","9","9","9","9","8","9","9","9","10","10","9","10","10","10","10","9","10","10","10","10","9","10","9");
this.EG_ratersnumber = new Array("5414","3383","6003","5152","4331","7466","2861","3964","2116","2721","4540","2172","1874","453","660","537","1575","611","746","246","176","282","52","1108","1248","123","995","7","22","3818","3140","959","2553","2434","2747","2007","2911","1559","6449","3069","3110","1435","10053","2163","3062");
this.EG_rating = new Array("4.708717","4.723913","4.686323","4.623641","4.677672","4.512054","4.711988","4.824924","4.888941","4.806688","4.821585","4.577808","4.511205","4.832229","4.639393","4.512104","4.201269","4.752863","4.831099","3.939024","4.454545","4.5","4.326923","4.730144","4.567307","4.487804","4.001005","4.428571","4.363636","4.594028","4.794267","4.821689","4.688601","4.857025","4.7925","4.905331","4.908622","4.721616","4.758567","4.867057","4.836012","4.836933","4.660002","4.871474","4.283148");
this.EG_status = new Array("1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","4","4","1","1","1","1","4","1","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0");
this.EG_onlinefee = new Array("1.99","2.99","1.99","3.99","3.99","3.99","3.77","1.99","1.99","1.99","1.99","1.99","1.99","1.99","1.99","1.99","1.99","1.99","3.77","1.99","1.99","2.99","1.99","1.99","1.99","2.99","1.99","1.99","1.99","3.89","1.99","2.99","3.99","1.99","1.99","3.97","3.98","3.99","1.99","3.99","2.99","2.97","1.99","2.25","1.99");
this.EG_title = new Array("","Mrs","","","","","","","","","","","","","","","","","","","","","Consultant Astrologer","","","","","","","","","","","","Psychic Advisor Dr. Singh","","ANN ROSS","","","consultant","","","","","");
}

var WizardParam =  new EG1973c25795dd4735934b3dac99e1b04a();
var ExpertGridObject_WizardParamEG1973c25795dd4735934b3dac99e1b04a=  new WizardParamEG1973c25795dd4735934b3dac99e1b04a();
var expertgrid_WizardParamEG1973c25795dd4735934b3dac99e1b04a ;
function Start_WizardParamEG1973c25795dd4735934b3dac99e1b04a(){if (typeof(ExpertGridObject_WizardParamEG1973c25795dd4735934b3dac99e1b04a.EG_Disable_Render)== 'undefined') { EGrender(ExpertGridObject_WizardParamEG1973c25795dd4735934b3dac99e1b04a,expertgrid_WizardParamEG1973c25795dd4735934b3dac99e1b04a);}}
 Start_WizardParamEG1973c25795dd4735934b3dac99e1b04a();


//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       
 }
