function drawAdCalls(nIndex){var idelay=750;var adCell=null;var strPageURL=document.location.pathname;strPageURL=escape(strPageURL.toLowerCase());if(strPageURL.indexOf("celebrities")>=0){strPageURL=escape("/detail/celebrity/");}var strAdCallURL="/TVGOL/tvgas.ashx";if(strPageURL.indexOf('/redesign/')==0){strAdCallURL="/redesign"+strAdCallURL;}strAdCallURL+="?rnd="+dartOrd;var strAdURL="";strAdCallURL+="&srchKey="+escape(strSearchKey);strAdCallURL+="&objName="+escape(strTvObjectName);strAdCallURL+="&objType="+escape(strTvObjectType);try{switch(optionGenreFilter){case 2: strAdCallURL+="&grdflt=movies";break;case 3: strAdCallURL+="&grdflt=sports";break;case 4: strAdCallURL+="&grdflt=family";break;case 5: strAdCallURL+="&grdflt=ppv";break;}}catch(err){}try{if(bHDTVOnlyFilter){strAdCallURL+="&hdflt=true";}}catch(err){}switch(nIndex){case 0:{dartTile++;adCell=document.getElementById("TvgoIFrameStore");if(adCell!=null){strAdURL=strAdCallURL+"&tile="+dartTile+"&plcmnt=header_320x55&bgcolor=b00506&pageURL="+strPageURL;adCell.src=strAdURL;}setTimeout("drawAdCalls(1)", idelay);break;}case 1:{adCell=document.getElementById("TvgoIFrameTop");if(adCell!=null){dartTile++;strAdURL=strAdCallURL+"&tile="+dartTile+"&plcmnt=banner_top&bgcolor=44443a&pageURL="+strPageURL;adCell.src=strAdURL;}setTimeout("drawAdCalls(2)", idelay);break;}case 2:{adCell=document.getElementById("TvgoIFrameBoxAd");if(adCell!=null){dartTile++;strAdURL=strAdCallURL+"&tile="+dartTile+"&plcmnt=box_300x250&bgcolor=FFFFFF&pageURL="+strPageURL;adCell.src=strAdURL;}setTimeout("drawAdCalls(3)", idelay);break;}case 3:{adCell=document.getElementById("TvgoIFrameBot");if(adCell!=null){dartTile++;strAdURL=strAdCallURL+"&tile="+dartTile+"&plcmnt=banner_bottom&bgcolor=DDDDDD&pageURL="+strPageURL;adCell.src=strAdURL;}setTimeout("drawAdCalls(4)", idelay);break;}case 4:{adCell=document.getElementById("TvgoIFramePromo");if(adCell!=null){dartTile++;strAdURL=strAdCallURL+"&tile="+dartTile+"&plcmnt=promo_320x95&bgcolor=FFFFFF&pageURL="+strPageURL;adCell.src=strAdURL;}setTimeout("drawAdCalls(5)", idelay);break;}case 5:{for(var n=0;n<iGridAds;n++){adCell=document.getElementById("inGridAdCell"+n);if(adCell!=null){adCell.src=getDARTag("mid_banner");}}break;}}}