
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            GLOBAL VARIABLES                            @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
  var GLV_MonsterCount = 2;  
  var GLV_MegaCount    = 0;  
  var GLV_HetCount     = 0;    
//........................................................
  var GLV_MonsterDailyViews = 6;  
  var GLV_MegaDailyViews    = 8;    
  var GLV_HetDailyViews     = 8;      
//----------------------------------------------------------------------------
  var GLV_HideTsaf          = 1;  
  var GLV_HideMadbeka       = 0;
  var GLV_HidePopUnderAuto  = 0;        
  var GLV_HidePopUnderClick = 0;          
  var blockPopups           = 0;
//----------------------------------------------------------------------------
  var GLV_CurrURL        = window.location.href.toLowerCase();
  var GLV_arCurrURLParts = fGL_GetLinkParts(GLV_CurrURL);
  var GLV_Protocol       = GLV_arCurrURLParts[0];  
  var GLV_Domain         = GLV_arCurrURLParts[1];
  var GLV_CurrFolder     = GLV_arCurrURLParts[2];                 
  var GLV_PageName       = GLV_arCurrURLParts[3];      
  var GLV_CurrQS         = GLV_arCurrURLParts[4];
  var GLV_FullPath       = GLV_arCurrURLParts[5];
//----------------------------------------------------------------------------    
  var GLV_AdmTest     = fGL_GetParamValueFromQS( GLV_CurrQS, "AdmTest"     ).toUpperCase(); // Banner Name For Test Campaign
  var GLV_AdmPage     = fGL_GetParamValueFromQS( GLV_CurrQS, "AdmPage"     );               // RM Page     For Test Campaign
  var GLV_Hol         = fGL_GetParamValueFromQS( GLV_CurrQS, "hol"         );  //  1 - Abroad Page
  var GLV_TestVilon   = fGL_GetParamValueFromQS( GLV_CurrQS, "testvilon"   );  //  1 - Show Vilon  				
  var GLV_TestIpad    = fGL_GetParamValueFromQS( GLV_CurrQS, "testipad"    );  //  1 - IPAD Page
  var GLV_ShowMons    = fGL_GetParamValueFromQS( GLV_CurrQS, "showmons"    );  //  = Top Banner Type From "fTopBnr_CrPlaceByBnrType()"  
  var GLV_TestHPVideo = fGL_GetParamValueFromQS( GLV_CurrQS, "testhpvideo" );  //  1 - Show HP Video  
  var GLV_TestHPPage  = fGL_GetParamValueFromQS( GLV_CurrQS, "testhppage"  );  //  1 - Tapuz HP, 2 - Inner HP   
  var GLV_TestNewVer  = fGL_GetParamValueFromQS( GLV_CurrQS, "testnewver"  );  //  1 - New Monsters, 0 - Old Monsters      
  var GLV_TestOzen    = fGL_GetParamValueFromQS( GLV_CurrQS, "testozen"    );  //  0 - Normal Align, 1 - Reverse Align     
  var GLV_ShowPop     = fGL_GetParamValueFromQS( GLV_CurrQS, "showpop"     );  //  = Pop Up Type From "fPU_CallPopUpByBnrType()" 
  var GLV_PopPage     = fGL_GetParamValueFromQS( GLV_CurrQS, "poppage"     );  //  RM Page for "showpop"
  var GLV_NewDesign   = fGL_GetParamValueFromQS( GLV_CurrQS, "newdesign"   );  //  1 - New Design of Inner HP  
  var GLV_HideBnr     = fGL_GetParamValueFromQS( GLV_CurrQS, "hidebnr"     );  //  0 - Hide All Banners, 1 - Hide Header Banner, 2 - Hide Footer Banner, 3 - Hide Left Ozen, 4 - Hide Right Ozen, 5 - Hide Text Link
  var GLV_TestCorner  = fGL_GetParamValueFromQS( GLV_CurrQS, "testcorner"  );  //  1 - Show Left Corner Banner from RM, 2 - Show Right Corner Banner from RM, 3 - Show Left Corner Banner from Test Page, 4 - Show Right Corner Banner from Test Page
  var GLV_ShowOzenR   = fGL_GetParamValueFromQS( GLV_CurrQS, "showozenr"   );  //  1 - Show Right Ozen
//----------------------------------------------------------------------------    
  var GLV_ForumId   = fGL_GetForumID();
  var GLV_CommunaId = fGL_GetCommunaID();
//----------------------------------------------------------------------------        
  var GLV_Cookie_MyTheme = fGL_ReadCookie("MyTheme","");
  var GLV_IsAbs          = fGL_getIsAbs();
//----------------------------------------------------------------------------      
  var GLV_IsTapuzHP       = fGL_isTapuzHP();
  var GLV_IsMitparPage    = fGL_isMitparPage();   
  var GLV_IsKingForumPage = fGL_isKingForumPage();
  var GLV_IsKingPage      = 0;
//----------------------------------------------------------------------------      
  var GLV_Browser_is = new fGL_BrowserCheck();
//----------------------------------------------------------------------------      
  var GLV_FLIX_ChannelId = -1;
  var GLV_FLIX_UserId    = -1;
//----------------------------------------------------------------------------         
  var GLV_BlockOzenLeft  = 0; 
  var GLV_BlockOzenRight = 0;
  var GLV_BlockCorner    = 0;  
//----------------------------------------------------------------------------        
  var GLV_KingPage = "";
  var GLV_MonsPage = "";
//----------------------------------------------------------------------------          
  var GLV_MonsterPage = "";
  var GLV_MonsterPos  = "";
  var GLV_MonsterBegBnr = "";
  var GLV_MonsterEndBnr = "";  
  var GLV_MonsterEndBnrPlace = 2;  // 1 - Before Header, 2 - Inside Header, 3 - After Header  
  var GLV_MonsterPlace       = 2;  // 1 - Before Header, 2 - Inside Header, 3 - After Header  
  var GLV_TopBnrPlace        = 2;  // 1 - Before Header, 2 - Inside Header, 3 - After Header    
//............................................................................  
  var GLV_UserTopBnrPlace = 0;  // 1 - Before Header, 2 - Inside Header, 3 - After Header, 0 - By Default 
//----------------------------------------------------------------------------            
  var BLOCK_VILON_BANNER = 0;
  var displayVilonBanner = 0;
//----------------------------------------------------------------------------        
  var adultsMonsterCount      = "";
  var realMediaBannerUrl      = "";
  var realMediaKingBannerUrl  = "";
  var headerBannerPosition    = "";
  var headerBannerWidth       = "";
  var headerBannerHeight      = "";
  var notHulBanner            =  0;
  var hideHeaderBanner        =  0;  
  var hideMonsterBanner       =  0;
  var GLV_HideAllBanners      =  0;      
  var GLV_HideFooterBanner    =  0;    
  var GLV_HideTextLink        =  0;    
  var GLV_HideLeftOzen        =  0;
  var GLV_HideRightOzen       =  1;  
//----------------------------------------------------------------------------        
  var GLV_ScriptStrToRun      = "";
  var GLV_AsyncElementsIds    = "";
  var GLV_MaxAsyncElementsIds =  1;
//----------------------------------------------------------------------------        
  var GLV_IsDevServer = ( ( GLV_Domain == "dev.tapuz.co.il"     || 
                            GLV_Domain == "flixdev.tapuz.co.il" ||
                            GLV_Domain == "scdev.tapuz.co.il"   ||
                            GLV_Domain == "sfdev.tapuz.co.il"    ) ? 1 : 0 );
//----------------------------------------------------------------------------          
  //var GLV_IsNewVersion = ( ( GLV_TestNewVer == "0" || GLV_TestNewVer == "1" ) ? parseInt(GLV_TestNewVer) : GLV_IsDevServer );  
  var GLV_IsNewVersion = ( ( GLV_TestNewVer == "0" || GLV_TestNewVer == "1" ) ? parseInt(GLV_TestNewVer) : 1 );  
//----------------------------------------------------------------------------            
  if ( GLV_ShowPop == "5" ) GLV_HideTsaf = 0;
//=======================================================================   
// IPAD/IPHONE VARIABLES
//=======================================================================   
  var agent = navigator.userAgent.toLowerCase();
  var is_iphone = ( agent.indexOf('iphone') != -1 );
  var is_ipad   = ( agent.indexOf('ipad')   != -1 ); 

  var RM_IPHONE_IPAD_STR = "";
  if ( is_iphone || is_ipad || GLV_TestIpad == "1" ) RM_IPHONE_IPAD_STR = "?5I";

  var RM_IPHONE_IPAD_PAGE = "www.tapuz.co.il/ipad";
//============================================================================
// BANNERS REFRESH CONSTANTS                                          
//============================================================================
  var numOfBanner = 0; 
  var bannerRefreshTime = 300000;   /* number of msec;  no refresh = 0 */
  var bannerRefreshList = ",x22,x30,x40,x41,x42,x59,x66,x93,x94,Top,Top2,Left2,Rigth1,Right2,Left3,Left1,x64,x01,x55,x56,x65,x73,x95,x96,x50,x77,"; 

  var bannerRefreshTime2 = 420000;   /* number of msec;  no refresh = 0 */
  var bannerRefreshList2 = ",x62,x63,x57,x76,"; 

  var bannerRefreshTime3 = 300000;   /* number of msec;  no refresh = 0 */
  var bannerRefreshList3 = ",x48,x49,x78,"; 

  var OzenNoFrameRefreshTime = 120000;

  var TickerCocaColaRefreshTime = 60000;

  if ( GLV_FullPath.indexOf ('/chat_newcatom') > 0 || GLV_IsTapuzHP == 1 ) 
  {
    bannerRefreshTime  = 0;
    bannerRefreshTime2 = 0;   
    bannerRefreshTime3 = 0;      
  }   
//============================================================================
// VARIABLES FOR "fGL_HidePageElements" AND "fGL_ShowPageElements" FUNCTIONS                                        
//============================================================================
  var arMitparHidden = new Array( "crrossSiteBanDiv", "crrossSiteBanRightDiv", "BannerRightDiv", 
                                  "newSearchContainer", "divMenuTopLinks", "divLogo", "divSearchMain",
	  	                          "divAruz", "divUSBar", "divTopMenu", "loginBox",
                                  "TopBannerCont", "nr_main", "divUserMenuContainer", "popDiv",
		  			              "closeMonsterRight", "closeMonsterLeft", "divTopBanners", 
		  			              "videoDiv", "monsterTBL1", "BlogTvPlayerDiv", "logoSection" );
  var GLV_IsChangeStyle = 0;
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            GLOBAL FUNCTIONS                            @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
function fGL_HidePageElements()
{
    GLV_IsChangeStyle = 1;
    
    for(var i=0; i < arMitparHidden.length; i++ )
    {
      var ob = document.getElementById(arMitparHidden[i]);
      if (ob) ob.style.visibility = "hidden";
    }

    var ar = document.getElementsByTagName('div');
    for(var i=0; i < ar.length; i++ )
      if (ar[i].className == 'areaSideBanner') { ar[i].style.visibility = "hidden"; break; }
}
//============================================================================
function fGL_ShowPageElements()
{
    if (GLV_IsChangeStyle != 1) return;

    for(var i=0; i < arMitparHidden.length; i++ )
    {
      var ob = document.getElementById(arMitparHidden[i]);
      if (ob) ob.style.visibility = "visible";
    }

    var ar = document.getElementsByTagName('div');
    for(var i=0; i < ar.length; i++ )
      if (ar[i].className == 'areaSideBanner') { ar[i].style.visibility = "visible"; break; }    
}
//============================================================================
function KingExt_Show() { fGL_HidePageElements(); }
//============================================================================
function KingExt_Hide() { closeMonster(); }
//============================================================================
function Monster_Show() { fGL_HidePageElements(); }
//============================================================================
function Monster_Hide() { closeMonster(); }
//============================================================================
// fGL_OpenCloseOzen - Open / Close Left Ozen And Right Ozen Banners
//----------------------------------------------------------------------------
// pBlockOzenL, pBlockOzenR: 
//   0   - open  banner 
//   1   - close banner 
//  else - do nothing
//----------------------------------------------------------------------------
// Exemple 1: Open Left Ozen And Close Right Ozen
//     fGL_OpenCloseOzen(0,1)
//----------------------------------------------------------------------------
// Exemple 2: Open Right Ozen and Left Ozen does not change
//     fGL_OpenCloseOzen(2,0)
//============================================================================
function fGL_OpenCloseOzen( pBlockOzenL, pBlockOzenR )
{
   var ar = new Array( "", "none" );

   var ob1 = document.getElementById("crrossSiteBanDiv");
   var ob2 = document.getElementById("crrossSiteBanRightDiv"); 

   GLV_BlockOzenLeft  = pBlockOzenL;
   GLV_BlockOzenRight = pBlockOzenR;
   
   try { ob1.style.display = ar[pBlockOzenL]; } catch(e){}
   try { ob2.style.display = ar[pBlockOzenR]; } catch(e){}
}
//============================================================================
// fGL_OpenCloseCorner - Open / Close Corner Banner
//----------------------------------------------------------------------------
// pBlockCorner: 
//   0   - open  banner 
//   1   - close banner 
//============================================================================
function fGL_OpenCloseCorner( pBlockCorner )
{
   var ar = new Array( "", "none" );

   var ob1 = document.getElementById("CornerLeftDiv");
   var ob2 = document.getElementById("CornerRightDiv"); 

   GLV_BlockCorner = pBlockCorner;
   
   try { ob1.style.display = ar[pBlockCorner]; } catch(e){}
   try { ob2.style.display = ar[pBlockCorner]; } catch(e){}
}
//============================================================================
function fGL_GetRefreshTime( position ) 
{
	var refrtime = 0;
	if ( bannerRefreshList.indexOf("," + position + ",") >= 0 )
	     refrtime = bannerRefreshTime;
	else if ( bannerRefreshList2.indexOf("," + position + ",") >= 0 )
	     refrtime = bannerRefreshTime2;
	else if ( bannerRefreshList3.indexOf("," + position + ",") >= 0 )
	     refrtime = bannerRefreshTime3;
	return refrtime;
}
//============================================================================
function fGL_GetRMLink( sitepage, position, srcType ) 
{
    var oas = "http://rm.tapuz.co.il/RealMedia/ads/";
    if (document.location.protocol == "https:") 
        oas = "https://rm.tapuz.co.il/RealMedia/ads/";

	var RN = new String (Math.random());
	var RNS = RN.substring(2,11);
	var oaspage = sitepage + '/1' + RNS + '@' + position;

    oaspage = oaspage.replace("%20","");
	
	if (srcType == 1) 
	   var src = oas + 'adstream_sx.ads/' + oaspage
	else
	   var src = oas + 'adstream_jx.ads/' + oaspage;

    return src;
}
//============================================================================
function DisplayAds (sitepage, position, width, height, isDotomi) {
	 DisplayAdsMain (sitepage, position, width, height, isDotomi);
}
//============================================================================
function DisplayAdsMain( sitepage, position, width, height, isDotomi ) 
{
    if ( GLV_HideAllBanners == 1 ) return;

    if ( RM_IPHONE_IPAD_STR != "" )
    {
       if (GLV_IsMitparPage == 1 && position == "x77")
          document.write ( 
           '\<scr' + 'ipt type="text/javascript"\>\<!--\n' +
           'google_ad_client = "ca-pub-7516658586904536";\n' +
           '/* ipad left homepages */\n' +
           'google_ad_slot = "4605070224";\n' +
           'google_ad_width = 250;\n' +
           'google_ad_height = 250;\n' +
           '//--\>\n' +
           '\</scr' + 'ipt\>\n' +
           '\<scr' + 'ipt type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"\>' +
           '\</scr' + 'ipt\>\n'
          );
       return;
       //if (position != "x40" && position != "Right") return;
       //position = "Right";
    }
    else if ( position == "x10" && ( GLV_ForumId == "1377" || GLV_ForumId == "29" || GLV_ForumId == "1490" || GLV_ForumId == "867" ) )
       sitepage = "adv1.tapuz.co.il/forums/mavaron/f" + GLV_ForumId;
    else if ( position == "x10" && realMediaBannerUrl.toLowerCase().indexOf('www.tapuz.co.il/forums/esh26/') != -1 ) 
       sitepage = "adv1.tapuz.co.il/forums/mavaron/esh26";
    else if ( position == "x10" && realMediaBannerUrl.toLowerCase() == 'www.tapuz.co.il/forums/esh26' ) 
       sitepage = "adv1.tapuz.co.il/forums/mavaron/esh26";
	
	numOfBanner ++;
	var spanId = position + '_' + numOfBanner;
	document.write ('\<span id="' + spanId + '"\>\</span\>');
	
	var refrtime = fGL_GetRefreshTime( position );
	RefreshAdsMain(sitepage, position, width, height, isDotomi, spanId, refrtime);
}
//============================================================================
function RefreshAdsMain( sitepage, position, width, height, isDotomi, spanId, refrtime ) 
{
    var ob = document.getElementById(spanId);
	if (ob)
	{
	 	if ( RM_IPHONE_IPAD_STR == "" ) 
	 	   var src = fGL_GetRMLink( sitepage, position + "?" + sitepage.replace("/","&"), 1 );
	 	else
	 	   var src = fGL_GetRMLink( RM_IPHONE_IPAD_PAGE, position + RM_IPHONE_IPAD_STR, 1 );
	
	    ob.innerHTML = "";	
	    ob.innerHTML = '\<iframe src="' + src + '" width=' + width + ' height=' + height + ' noresize id=mainBanner scrolling=No frameborder=0 marginheight=0 marginwidth=0 \>\<\/IFRAME\>';
	} 
    if (refrtime > 0) setTimeout("RefreshAdsMain('" + sitepage + "','" + position + "'," + width + "," + height + "," + isDotomi + ",'" + spanId + "'," + refrtime + ")",refrtime);
}
//============================================================================
function DisplayAdsAsync (sitepage, position, width, height) 
{
	var refrtime = fGL_GetRefreshTime( position );
    var src      = fGL_GetRMLink( sitepage, position + "?" + sitepage.replace("/","&"), 1 );
    var showBnr = 1;
    
    if ( RM_IPHONE_IPAD_STR != "" ) 
    {
       if (position == "x42" || position == "Right") 
           position = "Right"; 
       else 
           showBnr = 0;
       src = fGL_GetRMLink( RM_IPHONE_IPAD_PAGE, position + "?" + RM_IPHONE_IPAD_STR, 1 );    
    }   

	if ( showBnr == 1 )
	{
	  document.write('\<div width=' + width + ' height=' + height + ' id="AsyncMainBanner_' + GLV_MaxAsyncElementsIds + '" AsyncWidth="' + width + '" AsyncHeight="' + height + '" AsyncSRC="' + src + '" AsyncRefreshTime="' + refrtime + '"\>\<\/div\>');
	
	  GLV_AsyncElementsIds += "AsyncMainBanner_" + GLV_MaxAsyncElementsIds + ",";
	  GLV_MaxAsyncElementsIds += 1;
	}
}
//============================================================================
function LoadAllBannersAsync()
{
    if (GLV_AsyncElementsIds != "")
    {
        var refrFlag = 0;
        var GLV_AsyncElementsIdsArr = GLV_AsyncElementsIds.split(",");
        for(var i=0;i < GLV_AsyncElementsIdsArr.length; i++)
        {
            if (GLV_AsyncElementsIdsArr[i] != "")
            {
                var obj = document.getElementById(GLV_AsyncElementsIdsArr[i]);
                if (obj)
                {
			        var AsyncWidth    =          obj.attributes["AsyncWidth"].value;
			        var AsyncHeight   =          obj.attributes["AsyncHeight"].value;
			        var AsyncSRC      =          obj.attributes["AsyncSRC"].value;
			        var AsyncRefrTime = parseInt(obj.attributes["AsyncRefreshTime"].value);					
			
			        if (obj.innerHTML == "" || AsyncRefrTime > 0)
			            obj.innerHTML = "<IFRAME WIDTH=\"" + AsyncWidth + "\" HEIGHT=\"" + AsyncHeight + "\" NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC=\"" + AsyncSRC + "\"></IFRAME>";

			        if (AsyncRefrTime > 0) refrFlag = 1;                 
                }
            }
        }
        if (refrFlag > 0)
           setTimeout("LoadAllBannersAsync()", bannerRefreshTime);
        else
	    {
           GLV_AsyncElementsIds = "";
           GLV_MaxAsyncElementsIds = 1;
	    } 
    }
}
//============================================================================
function DisplayAdsWithValidate (sitepage, position, width, height, objIdStr)
{
    var src = fGL_GetRMLink( sitepage, position, 2 );
    document.write ('\<span id=' + objIdStr + ' style="width:' + width + 'px;height:' + height + 'px;"\>');
    document.write ('\<scr' + 'ipt type="text/javascript" src="' + src + '"\>\<\/scr' + 'ipt\>');
    document.write ('\<\/span\>');
}
//============================================================================
function DisplayAdsSpecial (sitepage, position, width, height) {
	DisplayAdsMainSpecial (sitepage, position, width, height);
}
//============================================================================
function DisplayAdsMainSpecial (sitepage, position, width, height) 
{
    var src = fGL_GetRMLink( sitepage, position, 2 );
	document.write ('\<scr' + 'ipt type="text/javascript" src="' + src + '"\>\<\/scr' + 'ipt\>');
}
//============================================================================
function DisplayFloatingAds (sitepage, position)
{
    if ( RM_IPHONE_IPAD_STR != "" ) sitepage = RM_IPHONE_IPAD_PAGE;

	var src = fGL_GetRMLink(sitepage, position + RM_IPHONE_IPAD_STR, 1);
    GLV_ScriptStrToRun += '\<scr' + 'ipt type="text/javascript" src="' + src + '"\>\<\/scr' + 'ipt\>';
}
//============================================================================
function DisplayAdsMain_Mlinks (sitepage, position) 
{
	var src = fGL_GetRMLink(sitepage, position, 1);
    GLV_ScriptStrToRun += '\<scr' + 'ipt type="text/javascript" src="' + src + '" charset="windows-1255"\>\<\/scr' + 'ipt\>';
}
//============================================================================
function DisplayAdsMainSXCGI (sitepage, position) 
{
    if ( RM_IPHONE_IPAD_STR != "" && position != "x22" && position != "x36" ) sitepage = RM_IPHONE_IPAD_PAGE;
    
    var src = fGL_GetRMLink( sitepage, position + RM_IPHONE_IPAD_STR, 1 );				
	document.write ('\<scr' + 'ipt type="text/javascript" src="' + src + '" charset="windows-1255"\>\<\/scr' + 'ipt\>');
}
//============================================================================
function DisplayAdsOzenNoFrame( sitepage, position ) 
{
     var src = fGL_GetRMLink( sitepage, position + "?" + sitepage.replace("/","&"), 1 );					 
	 document.write( '\<scr' + 'ipt type="text/javascript" src="' + src + '" charset="windows-1255"\>\<\/scr' + 'ipt\>' );

     if (OzenNoFrameRefreshTime > 0)
     {
     	numOfBanner ++;
	    var spanId = position + '_' + numOfBanner;
	    document.write ('\<span id="' + spanId + '" style="display:none;"\>\</span\>');

	    RefreshSpriteBanners( sitepage, position, spanId, OzenNoFrameRefreshTime );
	 }    
}
//============================================================================
function DisplayAdsNoFrameRefresh( sitepage, position, refrtime ) 
{
     var src = fGL_GetRMLink( sitepage, position, 1 );					 	 
	 document.write( '\<scr' + 'ipt type="text/javascript" src="' + src + '" charset="windows-1255"\>\<\/scr' + 'ipt\>' );

     if (refrtime < 0) refrtime = fGL_GetRefreshTime( position );     

     if (refrtime > 0)
     {
     	numOfBanner ++;
	    var spanId = position + '_' + numOfBanner;
	    document.write ('\<span id="' + spanId + '" style="display:none;" \>\</span\>');

        setTimeout("RefreshNoFrameBanners('" + sitepage + "','" + position + "','" + spanId + "'," + refrtime + ")",refrtime);
	 }    
}
//============================================================================
function RefreshNoFrameBanners( sitepage, position, spanId, refrtime )
{
  if (refrtime > 0) 
  {
    var objRM = document.getElementById(spanId);
    if (objRM)
    {
      //var src = fGL_GetRMLink( sitepage, position, 1 );					 	 
      var src = 'http://www.tapuz.co.il/general/dotomi_banners_refresh.asp?s=' + sitepage + '&p=' + position;

      objRM.innerHTML = "";	
      objRM.innerHTML = '\<iframe src="' + src + '" width="1100" height="700" noresize scrolling="AUTO" frameborder=0 marginheight=0 marginwidth=0 \>\<\/iframe\>';
    }  
    setTimeout("RefreshNoFrameBanners('" + sitepage + "','" + position + "','" + spanId + "'," + refrtime + ")",refrtime);
  }
}
//============================================================================
function fGL_ReplaceALL(text, strA, strB) 
{
    while ( text.indexOf(strA) != -1) text = text.replace(strA,strB); 
    return text;
}
//============================================================================
// Function fGL_DisplayAdsByLinkType
//============================================================================
function fGL_DisplayAdsByLinkType( pRMPage, pRMPos, pSrcType) 
{
   var src = fGL_GetRMLink( pRMPage, pRMPos, pSrcType );			
   document.write ('\<scr' + 'ipt type="text/javascript" src="' + src + '"\>\<\/scr' + 'ipt\>');  
}
//============================================================================
// Function fGL_GetLinkParts
//-----------------------------------------------------------------------
// Parameter "pLink" ==>  URL String
//-----------------------------------------------------------------------
// Returns Link Parts Array:
//  0 - Protocol 
//  1 - Domain 
//  2 - Folder 
//  3 - Page Name 
//  4 - Query String 
//  5 - Protocol + Domain + Folder + Page Name
//============================================================================
function fGL_GetLinkParts( pLink ) 
{
  var ind = 0;
  var arParts = new Array( "", "", "", "", "", "", "", "", "" );
 //----------------------------------------
  arParts[3] = pLink;
  ind = arParts[3].indexOf('?'); 
  if (ind >= 0) 
  {
     arParts[4] = arParts[3].substring( ind + 1 );
     arParts[3] = arParts[3].substring( 0, ind );
  }
 //----------------------------------------
  ind = arParts[3].lastIndexOf('/');
  if (ind >= 0) 
  {
     arParts[2] = arParts[3].substring( 0, ind + 1 );
     arParts[3] = arParts[3].substring( ind + 1 );
  }   
 //----------------------------------------
  for(var i=3; i < 5; i++)
  { 
    ind = arParts[i].lastIndexOf('#'); 
    if (ind >= 0) arParts[i] = arParts[i].substring( 0, ind );
  }
 //----------------------------------------  
  ind = arParts[3].lastIndexOf('.'); 
  if (ind < 0) 
  {
     arParts[2] = arParts[2] + arParts[3];
     arParts[3] = "";
  }   
 //----------------------------------------
  ind = arParts[2].indexOf('://');
  if (ind >= 0) 
  {
     arParts[0] = arParts[2].substring( 0, ind + 3 );
     arParts[2] = arParts[2].substring( ind + 3 );
  }   
 //----------------------------------------
  ind = arParts[2].indexOf('/');
  if (ind >= 0) 
  {
     arParts[1] = arParts[2].substring( 0, ind );
     arParts[2] = arParts[2].substring( ind );
  }   
 //----------------------------------------
  arParts[5] = arParts[0] + arParts[1] + arParts[2] + arParts[3];
 //----------------------------------------
  return(arParts);
}
//============================================================================
// Function fGL_GetParamValueFromQS
//----------------------------------------------------------------------------
// Parameters: 
//   QS    - Query String  
//   param - Search Parameter Name 
//----------------------------------------------------------------------------
// Returns Parameter Value if Query String     contains Parameter Name 
//                   or "" if Query String not contains Parameter Name 
//----------------------------------------------------------------------------
// For sample: 
//   QS    = "a=1&b=2&c=3" )
//   param = "b"
//   Function returns: "2"
//============================================================================
function fGL_GetParamValueFromQS( QS, param ) 
{
  var arParam;
  var val = "";

  if (QS != "")
  {
    var arQS = QS.split("&");

    for(var i=0; i < arQS.length; i++)
    {
       arParam = arQS[i].split("=");
       if (arParam.length > 1 && arParam[0].toLowerCase() == param.toLowerCase())
       {
          val = arParam[1];
          break;
       }   
    }
  }   
  return(val);
}
//=======================================================================
//  Function fGL_isHPDomain
//-----------------------------------------------------------------------
//  Function returns:
//    1 -- if this page is     Tapuz HP
//    0 -- if this page is not Tapuz HP 
//=======================================================================
function fGL_isHPDomain()
{
    if (GLV_TestHPPage == "1" || GLV_Domain == "www.tapuz.co.il" || GLV_Domain == "dev.tapuz.co.il") return 1;

    var domain = GLV_Domain.split('.')[0];

    if ( !isNaN(domain) && GLV_Domain == domain + ".tapuz.co.il" ) return 1;
    return 0;
}
//=======================================================================
//  Function fGL_isTapuzHP
//-----------------------------------------------------------------------
//  Function returns:
//    1 -- if this page is     Tapuz HP
//    0 -- if this page is not Tapuz HP 
//=======================================================================
function fGL_isTapuzHP()
{
    if ( GLV_TestHPPage   == "1") return 1;
    if ( fGL_isHPDomain() ==  0 ) return 0;
    
    var arrTapuzHP = new Array( "[%].tapuz.co.il/hp1.asp",              
                                "[%].tapuz.co.il",                                                
                                "[%].tapuz.co.il/",
                                "[%].tapuz.co.il/hp1pop/default.asp",              
                                "[%].tapuz.co.il/hp1pop",                                                
                                "[%].tapuz.co.il/hp1pop/",
                                "[%].tapuz.co.il/hp_video3.asp",
                                "[%].tapuz.co.il/homepagesnet/default.aspx",
                                "[%].tapuz.co.il/homepagesnet",
                                "[%].tapuz.co.il/homepagesnet/",            
                                "[%].tapuz.co.il/default.aspx"                                                    
                              );
    
    return ( fGL_SrchStrInArray( arrTapuzHP, GLV_FullPath ) < 0 ? 0 : 1 );
}
//=======================================================================
//  Function fGL_isMitparPage
//-----------------------------------------------------------------------
//  Function returns:
//    1 -- if this page has    permission for showing of special banner (Mitparetset)
//    0 -- if this page has no permission for showing of special banner
//=======================================================================
function fGL_isMitparPage()
{
    if (GLV_TestHPPage == "2") return 1;
    
    var arrMitpar = new Array(  "[%].tapuz.co.il/forums/default.asp",   
                                "[%].tapuz.co.il/forums",   
                                "[%].tapuz.co.il/forums/",
                                "[%].tapuz.co.il/tapuzforum/default.asp",
                                "[%].tapuz.co.il/tapuzforum",
                                "[%].tapuz.co.il/tapuzforum/",                                                                
                                "[%].tapuz.co.il/communa/default.asp",              
                                "[%].tapuz.co.il/communa",              
                                "[%].tapuz.co.il/communa/",
                                "[%].tapuz.co.il/blog/default.asp",                                                            
                                "[%].tapuz.co.il/blog",
                                "[%].tapuz.co.il/blog/",                                                                                                                            
                                "[%].tapuz.co.il/chat/default.asp",        
                                "[%].tapuz.co.il/chat",
                                "[%].tapuz.co.il/chat/" );
    return ( fGL_SrchStrInArray( arrMitpar, GLV_FullPath ) < 0 ? 0 : 1 );
}
//=======================================================================
//  Function fGL_isKingForumPage
//-----------------------------------------------------------------------
//  Function returns:
//    1 -- if this page has    permission for showing of king in forum pages 
//    0 -- if this page has no permission for showing of king in forum pages
//=======================================================================
function fGL_isKingForumPage()
{
   return ( ( GLV_PageName == 'forumpage.aspx' || GLV_PageName == 'viewmsg.aspx' ) ? 1 : 0  )
}
//=======================================================================
//  Function fGL_isKingPage
//-----------------------------------------------------------------------
//  Function returns:
//    1 -- if this page has    permission for showing of king banner
//    0 -- if this page has no permission for showing of king banner
//=======================================================================
function fGL_isKingPage()
{
  var ZoneName = realMediaBannerUrl.toLowerCase(); 
  ZoneName = ZoneName.replace (/www./,'home.');

  return ( ( ( ZoneName == 'home.tapuz.co.il/communa'    || 
		       ZoneName == 'home.tapuz.co.il/snooz'      || 
		       ZoneName == 'home.tapuz.co.il/blog'       || 
               ZoneName == 'home.tapuz.co.il/food'       || 
		       ZoneName == 'home.tapuz.co.il/index'      || 
    	       ZoneName == 'home.tapuz.co.il/bike'       || 
	           ZoneName == 'home.tapuz.co.il/bimo'       || 
		       ZoneName == 'home.tapuz.co.il/softwares'  || 
		       ZoneName == 'home.tapuz.co.il/forums'     || 
		       ZoneName == 'home.tapuz.co.il/chat'       || 
		       ZoneName == 'home.tapuz.co.il/albums'     || 
		       ZoneName == 'home.tapuz.co.il/news'       || 
		       ZoneName == 'home.tapuz.co.il/sport'      || 
    	       ZoneName == 'home.tapuz.co.il/blogtv'     || 
	           ZoneName == 'home.tapuz.co.il/pcards'     ||
	           ZoneName == 'home.tapuz.co.il/blogtvcoil'  ) && 
		     ( GLV_PageName == ''                        || 
	           GLV_PageName == 'default.asp'             || 
	           GLV_PageName == 'default.aspx'            || 			    	            
	           GLV_PageName == 'test_blogtv_banners.htm' || 			    	            			    	            
	           GLV_PageName == 'mysnooz.asp'              ) ) ? 1 : 0 );
}	      
//=======================================================================
// Function fGL_SrchStrInArray 
//-----------------------------------------------------------------------
//  pStchArr - array containing search strings.
//    Evry search string can contain combination of [%].
//    [%] - means any number of characters.
//  Samples:
//    [%]PART_TEXT[%] - Link contains    PART_TEXT
//       PART_TEXT[%] - Link begins with PART_TEXT
//    [%]PART_TEXT    - Link end in      PART_TEXT
//       PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function returns number of item in pStchArr 
//  wich is contained in pLink ( -1 - is not contained )
//=======================================================================
function fGL_SrchStrInArray( pStchArr, pLink )
{
    var val, arr, j;

    for( var i=0; i < pStchArr.length; i++ )
    {
      arr = pStchArr[i].toLowerCase().split('[%]'); 

      if ( arr.length == 1 && pLink == arr[0] ) return i;
      
      if ( arr.length == 2 && !fGL_isEmpty(arr[1]) )
      {
        val = arr[1];
        if ( pLink.length >= val.length && pLink.substring( pLink.length - val.length, pLink.length ) == val ) return i;
      }
      else if ( arr.length == 2 && !fGL_isEmpty(arr[0]) )
      {
        val = arr[0];
        if ( pLink.substring( 0, val.length ) == val ) return i;
      }
      else if ( arr.length == 3 && !fGL_isEmpty(arr[1]) )
      {
        val = arr[1];
        if ( pLink.indexOf(val) != -1 ) return i;
      }
    }
    return -1;
}
//============================================================================
// Function fGL_isEmpty
//============================================================================
function fGL_isEmpty(str) 
{
  var myExp = /\S/;
  var found = myExp.test(str);
  return !found;
}
//============================================================================
// fGL_IsStrInList
//-----------------------------------------------------------------------
// Returns true if the string (pStr) is in the list (pList)
//============================================================================
function fGL_IsStrInList(pStr,pList)
{
  if (pStr == "") return false;
  pStr = "," + pStr + ",";
  return ( pList.indexOf(pStr) != -1 );
}
//============================================================================
// fGL_GetCommunaID
//-----------------------------------------------------------------------
// Returns Communa ID value from Query String
//============================================================================
function fGL_GetCommunaID()
{
  if ( GLV_FullPath.indexOf('tapuz.co.il/communa/') == -1 ) return "";
  return fGL_GetParamValueFromQS( GLV_CurrQS, "communaid" );
}
//============================================================================
// fGL_GetForumID
//-----------------------------------------------------------------------
// Returns Forum ID value from Query String
//============================================================================  
function fGL_GetForumID()
{
  if ( GLV_FullPath.indexOf('tapuzforum/main/forumpage.asp') != -1 ) 
     return fGL_GetParamValueFromQS( GLV_CurrQS, "id" );
  return fGL_GetParamValueFromQS( GLV_CurrQS, "forumid" );
}	
//============================================================================
// fGL_SetCookie - function sets Cookies
//============================================================================
function fGL_SetCookie(name,value,days,domain,path)
{
  if (days)
  {
    var date = new Date();
    date.setTime( date.getTime() + ( days * 24 * 60 * 60 * 1000 ) );
    var expires = "; expires=" + date.toGMTString();
  }
  else 
    var expires = "";
 
  document.cookie = name + "=" + value + expires +
                  ((path)   ? "; path="   + path   : "") +
                  ((domain) ? "; domain=" + domain : "");
}
//==========================================================
// fGL_ReadCookie - function reads Cookies
//==========================================================
function fGL_ReadCookie( pName, pSubName )
{
    var sa, s, cr, c, i, j;
	var nameEQ = pName.toLowerCase() + "=";
	var ca = document.cookie.split(';');
	
	for( i=0; i < ca.length; i++ )
	{
		c = ca[i];
		while (c.charAt(0) == ' ') c = c.substring(1,c.length);
		
		if ( c.toLowerCase().indexOf(nameEQ) == 0 )
		{
		  cr = c.substring(nameEQ.length,c.length);
		  if ( pSubName == "" ) return cr;
		  
		  sa = cr.split("&");
          for( j=0; j < sa.length; j++ )
          {
            s = sa[j].split("=");
            if (s[0].toLowerCase() == pSubName.toLowerCase()) 
            {
               if ( s.length >= 1 ) return s[1];
               return "";
            }   
          }
		} 
	}
	return "";
}
//==========================================================
function fGL_BrowserCheck() 
{
    var b = navigator.appName;

    if (b == "Netscape") this.b = "ns";
    else if (b.toLowerCase().indexOf("explorer") != -1) this.b = "ie";
    else this.b = b;

    this.version = navigator.appVersion;
    this.v = parseInt(this.version);

    this.ns  = (this.b == "ns" && this.v >= 4);
    this.ns4 = (this.b == "ns" && this.v == 4);
    this.ns5 = (this.b == "ns" && this.v == 5);
    this.ns6 = (this.b == "ns" && this.v == 6);
    this.ie  = (this.b == "ie" && this.v >= 4);

    this.ie4 = false;
    this.ie5 = false;
    this.ie6 = false;
    this.ie7 = false;
    this.ie8 = false;

         if (this.version.indexOf('MSIE 9') > 0) this.ie9 = true;
    else if (this.version.indexOf('MSIE 8') > 0) this.ie8 = true;
    else if (this.version.indexOf('MSIE 7') > 0) this.ie7 = true;
    else if (this.version.indexOf('MSIE 6') > 0) this.ie6 = true;
    else if (this.version.indexOf('MSIE 5') > 0) this.ie5 = true;
    else if (this.version.indexOf('MSIE 4') > 0) this.ie4 = true;

    this.min = (this.ns || this.ie);
}
//=======================================================================
//  fGL_GetPageSize - Returns Page Size Parameters
//=======================================================================
function fGL_GetPageSize()
{
    var xScroll, yScroll;

    if (window.innerHeight && window.scrollMaxY) {
        xScroll = document.body.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
        xScroll = document.body.scrollWidth;
        yScroll = document.body.scrollHeight;
    } else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode
        xScroll = document.documentElement.scrollWidth;
        yScroll = document.documentElement.scrollHeight;
    } else { // Explorer Mac...would also work in Mozilla and Safari
        xScroll = document.body.offsetWidth;
        yScroll = document.body.offsetHeight;
    }

    var windowWidth, windowHeight;
    if (self.innerHeight) { // all except Explorer
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
    }

    // for small pages with total height less then height of the viewport
    if (yScroll < windowHeight)
        pageHeight = windowHeight;
    else 
        pageHeight = yScroll;

    // for small pages with total width less then width of the viewport
    if(xScroll < windowWidth)
        pageWidth = windowWidth;
    else
        pageWidth = xScroll;

    return [pageWidth, pageHeight, windowWidth, windowHeight];
} 
//=======================================================================
// Function fGL_getIsAbs
//-----------------------------------------------------------------------
// Function checks if it is necessary to use "position:absolute":
//   true  -     necessary  ( because old versions of IE do not support "position:fixed" )
//   false - not necessary  ( may use "position:fixed" )
//=======================================================================
function fGL_getIsAbs()
{
  if ( GLV_Domain == "sc.tapuz.co.il" || GLV_Domain == "scdev.tapuz.co.il"  ) return true;

  var b = navigator.appName.toUpperCase();
  var v = navigator.appVersion.toUpperCase();

  return b.indexOf("EXPLORER") != -1 && ( v.indexOf('MSIE 4') != -1 || 
	                                      v.indexOf('MSIE 5') != -1 ||
	                                      v.indexOf('MSIE 6') != -1  );
}
//============================================================================
function fGL_IsValidStr(ss) { return ( typeof ss != "undefined" && ss != undefined && ss != null && ss != "" ) }                   
//============================================================================
function fGL_IsValidInt(ss) { return ( typeof ss != "undefined" && ss !=  undefined && ss != null && ss != "" && !isNaN(ss) && parseInt(ss) > 0 ) }                   
//==========================================================
function fGL_GetRMBanner( pBnrSrc, pBnrName, pBnrW, pBnrH, pClickLink )
{
//....................................................... 
  if ( !fGL_IsValidStr(pBnrSrc)   || 
       !fGL_IsValidStr(pBnrName)  || 
       !fGL_IsValidInt(pBnrW)     ||
       !fGL_IsValidInt(pBnrH)     ||       
       !fGL_IsValidStr(pClickLink) ) return ""; 
//....................................................... 
  var ar = pBnrSrc.split(".");
  var imgType = ar[ar.length-1].toLowerCase();
//.......................................................     
  if ( imgType == "swf" )
     return(
      '<scr' + 'ipt type="text/javascript">\n' +
      '  function ' + pBnrName + '_DoFSCommand(command, args) { if ( command=="click" ) window.open("' + pClickLink + '",""); }\n' +
      '</scr' + 'ipt>\n' +

      '<scr' + 'ipt language=VBScript>\n' +
      '  on error resume next\n' +
      '  sub ' + pBnrName + '_O_FSCommand(ByVal command, ByVal args)\n' +
      '    call ' + pBnrName + '_DoFSCommand(command, args)\n' +
      '  end sub\n' +
      '</scr' + 'ipt>\n' +

      '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
      '        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ' +
      '          id="' + pBnrName + '_O" ' +
      '        name="' + pBnrName + '_O" ' +
      '        width="' + pBnrW + '" height="' + pBnrH + '">\n' +
      '  <param name="movie"   value="' + pBnrSrc + '">\n' +
      '  <param name="play"    value="true">\n' +
      '  <param name="loop"    value="true">\n' +
      '  <param name="menu"    value="false">\n' +
      '  <param name="wmode"   value="transparent">\n' +
      '  <param name="quality" value="high">\n' +
      '  <param name="allowScriptAccess" value="always">\n' +
      '  <param name="salign"  value="T">\n' +
      '  <embed src="' + pBnrSrc + '" ' +
      '         name="' + pBnrName + '" ' +
      '         width="' + pBnrW + '" height="' + pBnrH + '" ' + 
      '         type="application/x-shockwave-flash" ' +
      '         SWLiveConnect="true" ' +
      '         play="true" ' +
      '         loop="true" ' +
      '         menu="false" ' +
      '         wmode="transparent" ' +
      '         quality="best" ' +
      '         scale="showall" ' +  
      '         allowScriptAccess="always" ' +
      '         salign="T" ' +
      '         pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">\n' +
      '  </embed>\n' +
      '  <noembed>\n' +
      '    <a href="' + pClickLink + '"><img src="http://www.tapuz.co.il/images/pixel.gif" border="0" width="' + pBnrW + '" height="' + pBnrH + '"></a>\n' +
      '  </noembed>\n' +
      '</object>\n' );
//.......................................................       
 if ( imgType == "jpg" || imgType == "jpeg" || imgType == "gif" || imgType == "png" )
     return('<a id="' + pBnrName + '" href="' + pClickLink + '" target="_blank"><img src="' + pBnrSrc + '" border="0" width="' + pBnrW + '" height="' + pBnrH + '"></a>\n');    
//.......................................................      
 return "";
}
//============================================================================
// fVilonCookie
//----------------------------------------------------------------------------
// function sets banners parameters
//============================================================================
function fVilonCookie()
{
   fGL_SetBannersParam();
}
//============================================================================
// fGL_SetBannersParam
//----------------------------------------------------------------------------
// function sets banners parameters
//============================================================================
function fGL_SetBannersParam()
{
    GLV_HideAllBanners   = 0;      
    GLV_HideTextLink     = 0;    
    GLV_HideLeftOzen     = 0;
    GLV_HideRightOzen    = 1;
    blockPopups          = 0;  

         if ( GLV_HideBnr == "0" )  GLV_HideAllBanners   = 1;   //  0 - Hide All Banners, 
    else if ( GLV_HideBnr == "1" )  hideHeaderBanner     = 1;   //  1 - Hide Header Banner, 
    else if ( GLV_HideBnr == "2" )  GLV_HideFooterBanner = 1;   //  2 - Hide Footer Banner, 
    else if ( GLV_HideBnr == "3" )  GLV_HideLeftOzen     = 1;   //  3 - Hide Left  Ozen, 
    else if ( GLV_HideBnr == "4" )  GLV_HideRightOzen    = 1;   //  4 - Hide Right Ozen
    else if ( GLV_HideBnr == "5" )  GLV_HideTextLink     = 1;   //  5 - Hide Text Link    
    
    if (GLV_ShowOzenR == 1) GLV_HideRightOzen = 0; 
  //********************************************************
    if ( RM_IPHONE_IPAD_STR != "" )
    {
      hideMonsterBanner = 1;
      GLV_HideLeftOzen  = 1;
      GLV_HideRightOzen = 1;
      blockPopups       = 1;  
    }
  //********************************************************
    if ( GLV_FullPath.indexOf('tapuz.co.il/blog/net/maavaron.aspx') != -1 ) hideHeaderBanner = 1;
  //********************************************************
  //if ( GLV_IsDevServer == 1 ) GLV_HetCount  = 1;
  //if ( GLV_IsDevServer == 1 ) GLV_MegaCount = 1;
  //********************************************************    
  //if (GLV_Domain == "www.flix.co.il" || GLV_Domain == "flixdev.tapuz.co.il" || GLV_Domain == "flix.tapuz.co.il") hideMonsterBanner = 1;
  //********************************************************
    if (GLV_IsTapuzHP == 1) 
    {
      realMediaBannerUrl = "home.tapuz.co.il";
      GLV_MonsPage       = "home.tapuz.co.il"; 
      GLV_KingPage       = "home.tapuz.co.il/testking/mit";

      if (notHulBanner == 1) 
      {
        realMediaBannerUrl = "hol.tapuz.co.il";
        GLV_MonsPage       = "hol.tapuz.co.il";      
        GLV_KingPage       = "hol.tapuz.co.il";    
      }
    }
  //....................................................
    else if (GLV_IsMitparPage == 1) 
    {
      GLV_MonsPage = "adv9.tapuz.co.il";
      GLV_KingPage = "adv9.tapuz.co.il/testking/mit";	
    }
  //....................................................
    else 
    {
      GLV_MonsPage = "monsterall.tapuz.co.il";
      GLV_KingPage = realMediaBannerUrl.toLowerCase().replace( /www./,'home.' );

      //if ( realMediaBannerUrl.indexOf('www.tapuz.co.il/forums/esh26') == 0 ||
      //     realMediaBannerUrl.indexOf('www.tapuz.co.il/birth')        == 0  )
      //   GLV_MonsPage = realMediaBannerUrl;
    }
  //********************************************************
    BLOCK_VILON_BANNER = 0; 
    displayVilonBanner = 0;
  //....................................................    
    if ( GLV_IsTapuzHP != 1 && GLV_IsMitparPage != 1 && GLV_PageName != "forumpage.aspx" ) GLV_AdmTest = "";
  //....................................................        
    if ( GLV_AdmTest != "" ) 
    { 
      var AdmDefPage = "www.tapuz.co.il/testforum";
           if ( GLV_IsTapuzHP    == 1 ) AdmDefPage = "www.tapuz.co.il/testhome";
      else if ( GLV_IsMitparPage == 1 ) AdmDefPage = "www.tapuz.co.il/testpnimi";
      
      realMediaBannerUrl = AdmDefPage;
      GLV_MonsPage       = AdmDefPage; 
      GLV_KingPage       = AdmDefPage;  
      adultsMonsterCount = "";
      hideMonsterBanner  = 1;    
      BLOCK_VILON_BANNER = 1;

      if ( GLV_AdmTest == "VILON"   ) 
      { 
        BLOCK_VILON_BANNER = 0; 
        displayVilonBanner = 1; 
      }     
      else if ( GLV_AdmTest == "MONSTER" ) 
      { 
        GLV_HetCount          = 1;
        GLV_MegaCount         = 1;
        GLV_MonsterCount      = 1;
        GLV_MegaDailyViews    = 1;
        GLV_HetDailyViews     = 1;
        GLV_MonsterDailyViews = 1;
        hideMonsterBanner     = 0; 
        if ( GLV_ShowMons == "" ) GLV_ShowMons = "2";
      }  
    }
  //********************************************************
    if (GLV_ForumId != "" && realMediaBannerUrl == "mahadrin.tapuz.co.il")
        realMediaBannerUrl = "www.tapuz.co.il/forums/esh64/tat226/f" + GLV_ForumId;
  //********************************************************
    if ( realMediaBannerUrl == 'adv1.tapuz.co.il/harif/flix' )
    {
      headerBannerPosition = "x73";
      headerBannerWidth    = "728";
      headerBannerHeight   =  "90";
    }
	else if ( realMediaBannerUrl.toLowerCase().indexOf('tapuz.co.il/flix') != -1 )
	{
	  headerBannerPosition = "x96";
	  headerBannerWidth    = "728";
	  headerBannerHeight   =  "90";
	}   
  //********************************************************
    GLV_IsKingPage = fGL_isKingPage();
  //********************************************************
}
//============================================================================
function LoadMonster()
{
   if (GLV_HideAllBanners == 1) return;

   try { fTxtLink_Show();      } catch(ex){}    
   try { fOzen_startBanners(); } catch(ex){}
   try { fPU_CallPopUp();      } catch(ex){}
   try {
     if ( GLV_MonsterPos != "" && GLV_MonsterPage != "" )
     { 
       fTopBnr_ChangeBnrPlace( GLV_MonsterPlace );
       
       if ( GLV_MonsterPos == "x75" )
          DisplayAdsMainSXCGI( GLV_MonsterPage, GLV_MonsterPos );
       else { 
          var ob = document.getElementById("monsterBigTd");
          if (ob) ob.innerHTML = GLV_MonsterBegBnr;
       }  
     }
     else fTopBnr_ChangeBnrPlace( GLV_TopBnrPlace );
   } catch(ex) {}
}
//============================================================================
function fGL_LoadALLBanners()
{
    if (GLV_HideAllBanners == 1) return;

    try { LoadMonster();                      } catch(ex){}
    try { LoadAllBannersAsync();              } catch(ex){}
   	try { document.write(GLV_ScriptStrToRun); } catch(ex){}    
    try { if ( GLV_IsDevServer == 1 ) fCorner_showBanner(); } catch(ex){}
  //try { if ( GLV_IsDevServer == 1 ) fVilon_showVilonBanner(); } catch(ex){}
  //try { if ( GLV_IsDevServer == 1 ) fHPVideo_open();          } catch(ex){}
}
//=======================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            TOP BANNERS                                 @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//=======================================================================
// startMonster - Function calls Top Banner
//-----------------------------------------------------------------------
// arShowOrder parameters:
//   ma - Big  Monster (1146 x 160) + Left Ozen (117 x 498) + Right Ozen (117 x 498)
//   mm - Mega Monster ( 770 x 250)
//   mn - New  Monster ( 780 x 150) 
//   mo - Old  Monster ( 654 x 180)
//-----------------------------------------------------------------------
// Sample: Mega Monster, New Monster, New Monster
//  var arShowOrder = new Array( "mm_1", "mn_1", "mn_2" );  
//=======================================================================
function startMonster()
{
  //--------------------------------------------------------------------------		  
    try { if ( hideHeaderBanner == 1 ) return; } catch(e){}
  //--------------------------------------------------------------------------		      
    if ( GLV_ShowMons != "" )
    {
      var n = parseInt(GLV_ShowMons);
      if ( isNaN(GLV_ShowMons) || n < 0 || n > 6 ) n = 2;
      fTopBnr_CrPlaceByBnrType(n);
      return;
    }
  //--------------------------------------------------------------------------		  
    var showMons = fTopBnr_GetShowMonsterFlag(); // 0 - do not show, 
                                                 // 1 - show evry daysToExpire days, 
                                                 // 2 - show allways 
  //--------------------------------------------------------------------------		  
    if ( GLV_IsNewVersion == 1 )
    {
      if ( showMons != 0 ) 
      { 
        if (GLV_IsTapuzHP == 1 && notHulBanner == 1) 
        { if ( fTopBnr_CrPlaceByBnrType(4) == 1 ) return; }
        else 
        {
          if ( fTopBnr_CrPlaceByBnrType(0) == 1 ) return;
          if ( fTopBnr_CrPlaceByBnrType(1) == 1 ) return;
          if ( fTopBnr_CrPlaceByBnrType(3) == 1 ) return;
        }    
      }
      
      fTopBnr_CrPlaceForTopBanner("stb");  
      return;
    }
  //--------------------------------------------------------------------------		      	  
    if ( showMons != 0 ) 
    {  
      if ( GLV_IsTapuzHP == 1 && notHulBanner == 1 ) 
      { if ( fTopBnr_CrPlaceByBnrType(6) == 1 ) return; }    
      else
      { if ( fTopBnr_CrPlaceByBnrType(5) == 1 ) return; }
    }
    
    var currClientDate = new Date();
	var currSecond = currClientDate.getSeconds();

	if ( ( GLV_IsTapuzHP == 1 && currSecond % 4 != 0 && GLV_KingPage != "" ) || 
	     ( GLV_IsKingForumPage == 0 && GLV_IsKingPage == 1 ) )
	  fTopBnr_CrPlaceForTopBanner("ko");
    else
      fTopBnr_CrPlaceForTopBanner("stb");  
  //--------------------------------------------------------------------------		      	  
}
//=======================================================================
// fTopBnr_CrPlaceByBnrType
// Function creates place for showing Top Banner by Banner Type
//-----------------------------------------------------------------------
// pBnrType: 
//  0 - Het Monster
//  1 - Mega Monster
//  2 - All Old And New Monsters ( Test )
//  3 - New Monsters 
//  4 - New Monster For Hul
//  5 - Old Monsters 
//  6 - Old Monster For Hul
//-----------------------------------------------------------------------
// cookiePath: "/" - By Domain,  "" - By Current Folder
//=======================================================================
function fTopBnr_CrPlaceByBnrType(pBnrType)
{
    if (pBnrType == 0)    // Het Monster
    {
      if (GLV_HetCount < 1 || GLV_HetDailyViews < 1) return 0;

      var arShowOrder = new Array();  
      for(var m=0; m < GLV_HetCount; m++)
          arShowOrder[m] = "ma_" + (m+1);

      var daysToExpire = 1/GLV_HetDailyViews;
      var cookieName   = "MonsterHet";
      if ( GLV_IsTapuzHP == 1 ) cookieName = "MonsterHetHP";      
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................  
    else if (pBnrType == 1)    // Mega Monster
    {
      if (GLV_MegaCount < 1 || GLV_MegaDailyViews < 1) return 0;
          
      var arShowOrder = new Array();  
      for(var m=0; m < GLV_MegaCount; m++)
          arShowOrder[m] = "mm_" + (m+1);

      var daysToExpire = 1/GLV_MegaDailyViews;
      var cookieName   = "MonsterMegaInner";
      if ( GLV_IsTapuzHP    == 1 ) cookieName = "MonsterMegaHP";
      if ( GLV_IsMitparPage == 1 ) cookieName = "MonsterMega";      
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else if (pBnrType == 2)    // All Old And New Monsters
    {
      var arShowOrder  = new Array( "ma_1", "mm_1", "mn_1", "mo_1", "ko_1");  
      var daysToExpire = 1/6;
      var cookieName   = "MonsterTest";
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else if (pBnrType == 3)    // New Monsters
    {
      if (GLV_MonsterCount < 1 || GLV_MonsterDailyViews < 1) return 0;

      var arShowOrder = new Array();  
      for(var m=0; m < GLV_MonsterCount; m++)
          arShowOrder[m] = "mn_" + (m+1);

      var daysToExpire = 1/GLV_MonsterDailyViews;
      var cookieName   = "MonsterNew";
      if ( GLV_IsTapuzHP == 1 ) cookieName = "MonsterNewHP";      
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else if (pBnrType == 4)    // New Monster For Hul
    {
      var arShowOrder  = new Array( "mn_1" );  
      var daysToExpire = 1/3;
      var cookieName   = "MonsterNewHul";
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else if (pBnrType == 5)    // Old Monsters
    {
      var arShowOrder = new Array();  
      for(var m=0; m < GLV_MonsterCount; m++)
          arShowOrder[m] = "mo_" + (m+1);
      arShowOrder[m] = "ko_1";
         
      var daysToExpire = 1/6;
      if (GLV_MonsterCount < 3) daysToExpire = 1/3;
      
      var cookieName   = "MonsterOld";
      if ( GLV_IsTapuzHP == 1 ) cookieName = "MonsterOldHP";      
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else if (pBnrType == 6)    // Old Monster For Hul
    {
      var arShowOrder  = new Array( "mo_1" );  
      var daysToExpire = 1/3;
      var cookieName   = "MonsterOldHul";
      var cookieDomain = "";
      var cookiePath   = "/"; 
    }
  //..........................................................      
    else return 0;
  //..........................................................  
    var isTest = 0;
    if ( GLV_ShowMons != "" ) { cookieName = "MonsterTest"; isTest = 1; }
  //..........................................................  
    var MonstersNum = arShowOrder.length;          
    if ( pBnrType != 2 && GLV_IsKingForumPage == 0 && arShowOrder[MonstersNum-1].split("_")[0] == "ko" ) MonstersNum--;
  //..........................................................  
    var currCookie = fGL_ReadCookie( cookieName, "" );
  //..........................................................  
    for (var i=0; i < MonstersNum; i++) 
      { if ( currCookie == arShowOrder[i] ) break; }
  //..........................................................  
    if ( i >= MonstersNum || ( i == MonstersNum-1 && isTest == 1 ) ) i = -1;
  //..........................................................  
	if ( isTest == 0 && adultsMonsterCount != "" ) 
	{ 
	  i = parseInt(adultsMonsterCount)-1;
	  if (i < -1 || i >= MonstersNum-1 ) i = MonstersNum;
    } 
  //..........................................................  
    for( var j=i; j < MonstersNum-1; j++ ) 
    {
      var newCookie = arShowOrder[j+1];
      var monsType = newCookie.split("_")[0];

      if ( monsType == "ma" && screen.width < 170 ) continue;
      if ( monsType == "ma" && ( GLV_IsMitparPage == 0 && GLV_IsTapuzHP == 0 ) ) continue;      
      if ( monsType == "mm" && ( GLV_IsMitparPage == 0 && GLV_IsTapuzHP == 0 &&
                                 GLV_FullPath.indexOf('forums2008/forumpage.aspx') == -1 &&
                                 GLV_FullPath.indexOf('forums2008/viewmsg.aspx')   == -1  ) ) continue;

      fTopBnr_CrPlaceForTopBanner( monsType );
      if ( adultsMonsterCount == "" ) fGL_SetCookie( cookieName, newCookie, daysToExpire, cookieDomain, cookiePath);
      return 1;
    }
    return 0;
  //...............................................			        
}
//=======================================================================
// fTopBnr_SetLocationParam - Function sets parameters for Top Banners Location
//-----------------------------------------------------------------------
// pBnrType values:
//   ko - Old  King    ( 728 x 120)
//   ma - Het  Monster (1146 x 160) + (117 x 498) + (117 x 498)
//   mm - Mega Monster ( 770 x 250)
//   mn - New  Monster ( 780 x 150) 
//   mo - Old  Monster ( 654 x 180)
//   ba - Top Banner 1 ( 728 x  90)
//   bb - Top Banner 2 ( 468 x  60) + (234 x 60)
//   bc - Top Banner 3 ( 234 x  60) + (234 x 60) + (234 x 60)
//-----------------------------------------------------------------------
// Top Banners Location: 1 - Before Header, 2 - Inside Header, 3 - After Header   
//=======================================================================
function fTopBnr_SetLocationParam( pBnrType )
{
  //.............................................  
    if (GLV_UserTopBnrPlace > 0 && GLV_UserTopBnrPlace < 4)
    {
      GLV_MonsterEndBnrPlace = GLV_UserTopBnrPlace;
      GLV_MonsterPlace       = GLV_UserTopBnrPlace;
      GLV_TopBnrPlace        = GLV_UserTopBnrPlace;
      return;
    }
  //.............................................          
    if ( GLV_Domain == "sc.tapuz.co.il"    ||
	     GLV_Domain == "sf.tapuz.co.il"    ||
	     GLV_Domain == "scdev.tapuz.co.il" ||
	     GLV_Domain == "sfdev.tapuz.co.il"  ) 
    {
      GLV_MonsterEndBnrPlace = 2;
      GLV_MonsterPlace       = 2;
      GLV_TopBnrPlace        = 2;
      return;      
    }
  //.............................................          
    if ( GLV_IsNewVersion != 1 )
    {
      GLV_MonsterEndBnrPlace = 1;
      GLV_MonsterPlace       = 1;
      GLV_TopBnrPlace        = 1;
      return;            
    }
  //.............................................      
    GLV_MonsterEndBnrPlace = 2;   
    GLV_MonsterPlace       = 2;   
    GLV_TopBnrPlace        = 2;   
  //.............................................  
    if ( GLV_IsTapuzHP == 1 )
    {
      GLV_MonsterEndBnrPlace = 2;
      GLV_MonsterPlace       = 2;
      GLV_TopBnrPlace        = 2;
    }
  //.............................................          
    else if ( GLV_IsMitparPage == 1 )
    {
      GLV_MonsterEndBnrPlace = 2;
      GLV_MonsterPlace       = 2;
      GLV_TopBnrPlace        = 2;
    }
  //.............................................      
    if (pBnrType == "ma") GLV_MonsterPlace = 1;
  //.............................................      
}
//=======================================================================
// fTopBnr_CrPlaceForTopBanner - Function creates place for showing Top Banner
//-----------------------------------------------------------------------
// pBnrType values:
//   ko - Old  King    ( 728 x 120)
//   ma - Het  Monster (1146 x 160) + (117 x 498) + (117 x 498)
//   mm - Mega Monster ( 770 x 250)
//   mn - New  Monster ( 780 x 150) 
//   mo - Old  Monster ( 654 x 180)
//   ba - Top Banner 1 ( 728 x  90)
//   bb - Top Banner 2 ( 468 x  60) + (234 x 60)
//   bc - Top Banner 3 ( 234 x  60) + (234 x 60) + (234 x 60)
//=======================================================================
function fTopBnr_CrPlaceForTopBanner( pBnrType )
{
  //---------------------------------------------
   var arParam = fTopBnr_GetRMParam();
  //---------------------------------------------
   var vBnrType = pBnrType;
   if (vBnrType == "stb") vBnrType = arParam[0];
  //---------------------------------------------   
    var arBnrType = new Array(  "ko",    "ma",  "mm",  "mn",  "mo",   "ba",  "bb",   "bc",          "bd"      );
    var arBnrW    = new Array(   728,    1146,   770,   780,   654,    728,   715,    722,           780      );
    var arBnrH    = new Array(   120,     160,   250,   150,   180,     90,    60,     60,           150      );
    var arBnrPos1 = new Array( "x21",    "x75", "x38", "x39", "x20", "Top2", "Top", "TopRightOLD", "TopRight" );    
    var arBnrPos2 = new Array( "x24OLD", "x70", "x68", "x69", "x23",   "",   "x49", "Middle2",        ""      );    
    var arBnrPos3 = new Array(    "",     "",    "",    "",    "",     "",    "",   "TopLeft",        ""      );            
    var arBnrSmW  = new Array(   728,     728,   728,   728,   728,    -1,    -1,     -1,             -1      );
    var arBnrSmH  = new Array(    90,      90,    90,    90,    90,    -1,    -1,     -1,             -1      );
  //---------------------------------------------
    for ( var i=0; i < arBnrType.length; i++ )
       if ( vBnrType == arBnrType[i] ) break;
  //---------------------------------------------
    if ( i >= arBnrType.length ) return;
  //---------------------------------------------    
    var vBnrW    = arBnrW   [i];
    var vBnrH    = arBnrH   [i]; 
    var vBnrPos1 = arBnrPos1[i]; 
    var vBnrPos2 = arBnrPos2[i]; 
    var vBnrPos3 = arBnrPos3[i];         
    var vBnrSmW  = arBnrSmW [i];
    var vBnrSmH  = arBnrSmH [i]; 
  //---------------------------------------------        
    var vBnrPage = realMediaBannerUrl;
  //---------------------------------------------            
    if (pBnrType == "stb") 
    {
      if ( arParam[1] != "" ) vBnrPage = arParam[1];
      if ( arParam[2] != "" ) vBnrPos1 = arParam[2];
      if ( arParam[3] != "" ) vBnrPos2 = arParam[3];
      if ( arParam[4] != "" ) vBnrPos3 = arParam[4];
      
      if ( !isNaN(headerBannerWidth)  && parseInt(headerBannerWidth)  > 0 ) vBnrW = parseInt(headerBannerWidth); 
      if ( !isNaN(headerBannerHeight) && parseInt(headerBannerHeight) > 0 ) vBnrH = parseInt(headerBannerHeight);       
    }
  //************************************************************
    GLV_MonsterPos  = "";
    GLV_MonsterPage = "";
    GLV_MonsterBegBnr = "";    
    GLV_MonsterEndBnr = "";
    fTopBnr_SetLocationParam( vBnrType );
  //************************************************************
    if (RM_IPHONE_IPAD_STR != "" && GLV_IsMitparPage == 1)
    {
       document.write ( 
        '\<scr' + 'ipt type="text/javascript"\>\<!--\n' +
        'google_ad_client = "ca-pub-7516658586904536";\n' +
        '/* ipad top homepages */\n' +
        'google_ad_slot = "9491977899";\n' +
        'google_ad_width = 728;\n' +
        'google_ad_height = 90;\n' +
        '//--\>\n' +
        '\</scr' + 'ipt\>\n' +
        '\<scr' + 'ipt type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"\>' +
        '\</scr' + 'ipt\>\n' );
    }
    else if ( vBnrType == "ma" || vBnrType == "ko" || vBnrType == "mm" || vBnrType == "mn" || vBnrType == "mo" ) 
    {
       GLV_MonsterPos  = vBnrPos1;
       GLV_MonsterPage = GLV_MonsPage; 
       if ( vBnrType == "ko" ) GLV_MonsterPage = GLV_KingPage;
       if ( RM_IPHONE_IPAD_STR != "" ) GLV_MonsterPage = RM_IPHONE_IPAD_PAGE;
     //---------------------------------------------
       if ( GLV_MonsterPage != "" && GLV_MonsterPos != "" )
       {
       
         //if (GLV_IsDevServer == 1 && GLV_MonsterPos = "x39") GLV_MonsterPos = "x57";
       
         var src = fGL_GetRMLink( GLV_MonsterPage, GLV_MonsterPos + RM_IPHONE_IPAD_STR, 1 )
         //src = "http://dev.tapuz.co.il/hp1_test_ford_iframe_780x150.asp";
         //src = "http://dev.tapuz.co.il/hp1_mitparecet_test_tags.asp";
	     GLV_MonsterBegBnr = '\<iframe src="' + src + '" width=' + vBnrW + ' height=' + vBnrH + ' noresize scrolling=no frameborder=0 marginheight=0 marginwidth=0 \>\<\/iframe\>';

         if ( vBnrPos2 != "" && vBnrSmW > 0 && vBnrSmH > 0 )
         {
           src = fGL_GetRMLink( GLV_MonsterPage, vBnrPos2 + RM_IPHONE_IPAD_STR, 1 )
	       GLV_MonsterEndBnr = '\<iframe src="' + src + '" width=' + vBnrSmW + ' height=' + vBnrSmH + ' noresize scrolling=no frameborder=0 marginheight=0 marginwidth=0 \>\<\/iframe\>';
         }
       }   
     //---------------------------------------------    
       var vBnrMaxW  = 780;
       var vButW     =  15;    
       var vButH     =  15;        
       var vButSpace =   2;
       var vButL     =   0;
       var vMainW = vBnrW + ( vButW + vButSpace ) * 2;
       if ( vMainW > vBnrMaxW ) { vMainW = vBnrW; vButL = 10; }
     //---------------------------------------------    
       if ( vBnrType == "ma" ) 
       {
          fGL_OpenCloseOzen(1,1);
          fGL_OpenCloseCorner(1);   
	      document.write(
	       "<div id='monsterMain' style='padding:3px; text-align:center; margin:0 auto; position:relative; width:" + vBnrW + "px; height:" + vBnrH + "px; z-index:120000;'>" +
	       "<div id='monsterBigTdSm' style='text-align:center; margin:0 auto; display:none; z-index:120000;'></div>" +	     	     
	       "<div id='monsterBigTd'   style='text-align:center; margin:0 auto; width:" + vBnrW + "px !important; height:" + vBnrH + "px !important; z-index:120000;'></div>" +
	       "<div id='closeMonsterBut' style='position:absolute; width:" + vButW + "px; height:" + vButH + "px; top:20px; right:20px; z-index:120500;'>" +
	       "<img alt='свеш' src='http://www.tapuz.co.il/HP/HPimages/B_CloseBanner.gif' style='cursor:pointer;' onclick='closeMonster();'/>" +
	       "</div>" +
	       "</div>" );
	   } else {
	      document.write(
	       "<div id='monsterMain' style='padding:3px; text-align:center; margin:0 auto; position:relative; width:" + vMainW + "px; height:" + vBnrH + "px; z-index:1;'>" +
	       "<div id='monsterBigTdSm' style='text-align:center; margin:0 auto; display:none; z-index:1;'></div>" +	     
	       "<div id='monsterBigTd'   style='text-align:center; margin:0 auto; width:" + vBnrW + "px !important; height:" + vBnrH + "px !important; z-index:1;'></div>" +
	       "<div id='closeMonsterBut' style='position:absolute; width:" + vButW + "px; height:" + vButH + "px; bottom:10px; left:" + vButL + "px; z-index:2;'>" +
	       "<img alt='свеш' src='http://www.tapuz.co.il/HP/HPimages/B_CloseBanner.gif' style='cursor:pointer;' onclick='closeMonster();'/>" +
	       "</div>" +
	       "</div>" );
	   }  
    }
  //************************************************************	
	else if ( vBnrType == "ba" ||  vBnrType == "bd" )   
	{
	    document.write("<div style='padding:3px; width:" + vBnrW + "px; height:" + vBnrH + "px; margin:0 auto; position:relative;'>");	
	    DisplayAdsAsync ( vBnrPage, vBnrPos1, vBnrW, vBnrH );
	    document.write("</div>");	    
	}    
  //************************************************************	
	else if ( vBnrType == "bb" )     
	{
	    document.write("<div style='width:" + vBnrW + "px; height:" + (vBnrH+6) + "px; margin:0 auto; position:relative;'>");
	    document.write("<div style='position:absolute; right:3px; top:3px;'>");
	    DisplayAdsAsync ( vBnrPage, vBnrPos1, 468, vBnrH );
	    document.write("</div>");
	    document.write("<div style='position:absolute; left:3px; top:3px;'>");	    
	    DisplayAdsAsync ( vBnrPage, vBnrPos2, 234, vBnrH );
	    document.write("</div>");
	    document.write("</div>");
	}
  //************************************************************	
	else if ( vBnrType == "bc" )     
	{
	    document.write("<div style='width:" + vBnrW + "px; height:" + (vBnrH+6)+ "px; margin:0 auto; position:relative;'>");
	    document.write("<div style='position:absolute; right:3px; top:3px;'>");
	    DisplayAdsAsync ( vBnrPage, vBnrPos1, 234, vBnrH );
	    document.write("</div>");
	    document.write("<div style='position:absolute; left:244px; top:3px;'>");	    
	    DisplayAdsAsync ( vBnrPage, vBnrPos2, 234, vBnrH );
	    document.write("</div>");
	    document.write("<div style='position:absolute; left:3px; top:3px;'>");	    
	    DisplayAdsAsync ( vBnrPage, vBnrPos3, 234, vBnrH );
	    document.write("</div>");
	    document.write("</div>");
	}
  //************************************************************
}
//=======================================================================
// fTopBnr_GetRMParam
//-----------------------------------------------------------------------
// Function returns array RM Parameters for Top Banner 
//=======================================================================
function fTopBnr_GetRMParam()
{
  //--------------------------------------------------------------  
    var vRMBnr = realMediaBannerUrl.toLowerCase();
  //--------------------------------------------------------------      
	var vTOPBNR_RMPage  = realMediaBannerUrl;	  
	var vTOPBNR_RMPos1  = "";
	var vTOPBNR_RMPos2  = "";
	var vTOPBNR_RMPos3  = "";
  //........................................................
    if ( GLV_IsTapuzHP == 1 ) 
            return ["bd", vTOPBNR_RMPage, vTOPBNR_RMPos1, vTOPBNR_RMPos2, vTOPBNR_RMPos3];
  //........................................................
    if ( GLV_PageName.indexOf('newblogtvadultsprograms.asp') != -1 )  // display one banner if this is a adults page
            return ["ba", "adv4.tapuz.co.il/blogtva/top", vTOPBNR_RMPos1, vTOPBNR_RMPos2, vTOPBNR_RMPos3];
  //........................................................
    if ( GLV_CommunaId == "38213"                              || 
         realMediaBannerUrl == "www.tapuz.co.il/albums/fanta"  || 
         realMediaBannerUrl == "www.tapuz.co.il/oceanspray"    ||
	     GLV_FullPath.indexOf ('meyeden') != -1                      )
	        return ["ba", vTOPBNR_RMPage, vTOPBNR_RMPos1, vTOPBNR_RMPos2, vTOPBNR_RMPos3];
  //........................................................	     
    if ( headerBannerPosition == "" && GLV_PageName != "" && GLV_PageName != "default.asp" && GLV_PageName != "default.aspx" )
	        return ["bb", vTOPBNR_RMPage, vTOPBNR_RMPos1, vTOPBNR_RMPos2, vTOPBNR_RMPos3];
  //........................................................
    if ( headerBannerPosition != "") vTOPBNR_RMPos1 = headerBannerPosition;
  //........................................................
    if ( vRMBnr.indexOf('adv1.tapuz.co.il/harif/flix') != -1 )
	     vTOPBNR_RMPos1 = "x73";
    else if ( vRMBnr.indexOf('tapuz.co.il/forums') != -1 )
	     vTOPBNR_RMPos1 = "x95";
	else if ( vRMBnr.indexOf('tapuz.co.il/flix') != -1 )
	     vTOPBNR_RMPos1 = "x96";
	else if ( vRMBnr.indexOf('tapuz.co.il/birth') != -1 )
	     vTOPBNR_RMPos1 = "x50";
    else if ( GLV_CurrURL.indexOf('tapuz.co.il/minisites/radiojerusalem') != -1 )
	     vTOPBNR_RMPos1 = "x65";
  //........................................................
    return ["ba", vTOPBNR_RMPage, vTOPBNR_RMPos1, vTOPBNR_RMPos2, vTOPBNR_RMPos3];
  //--------------------------------------------------------------        
}
//=======================================================================
// Function fTopBnr_GetShowMonsterFlag 
//-----------------------------------------------------------------------
//  Function returns Show Flag for Monster Banner:
//      0 - do not show Monster 
//      1 - show Monster by time in cookie
//      2 - show allways
//=======================================================================
function fTopBnr_GetShowMonsterFlag()
{
 //.............................................................. 
 // Forums and domains where the monster won't be displayed:
 //.............................................................. 
    var hideInForumsStr = ",209,242,892,977,1196,1393,1347,1296,1187,1394,173,1505,1538,1563,56,82,74,98,105,140,143,163,180,183,198,203,213,250,284,286,341,418,469,481,484,490,530,556,741,818,917,926,984,1111,1314,1363,1420,1571,1345,1499,317,556,1425,180,98,1643,190,"
    var hideInDomains = ",jafi,shilav,tv3,sport5,sportil,globes,esc99,bezeq,rating,hot,eonline,pictor,shvoong,maariv,ichilov,shvoong,"
 //..............................................................
    if ( hideMonsterBanner == 1 ) return 0; 
	if ( fGL_IsStrInList( GLV_ForumId,              hideInForumsStr ) ) return 0;
	if ( fGL_IsStrInList( GLV_Domain.split(".")[0], hideInDomains   ) ) return 0;
	if ( GLV_CurrURL.indexOf('meyeden') != -1 ) return 0;
    return 1;
 //..............................................................             
}
//============================================================================
function fTopBnr_ChangeBnrPlace( pPlace )
{
  if ( pPlace < 1 || pPlace > 3) return;
  
  var arObj = new Array ( document.getElementById("divTopBanner1"),
                          document.getElementById("divTopBanner2"),  
                          document.getElementById("divTopBanner3")  );    
  var obTo = arObj[pPlace-1];  
  if (obTo) obTo.style.display = "";

  for( var i=0; i < arObj.length; i++ )
  {
    if ( arObj[i] && (i != pPlace-1) ) 
    {
      arObj[i].style.display = "none";
      if ( obTo && !fGL_isEmpty(arObj[i].innerHTML) ) 
      {
        obTo.innerHTML = arObj[i].innerHTML; 
        arObj[i].innerHTML = "";
        obTo = false;
      }
    }    
  }
}
//============================================================================
function closeMonster()
{
   fTopBnr_ChangeBnrPlace( GLV_MonsterEndBnrPlace );
   
   var ob1 = document.getElementById("closeMonsterBut");
   var ob2 = document.getElementById("monsterBigTd");
   var ob3 = document.getElementById("monsterBigTdSm");
   var ob4 = document.getElementById("monsterMain");

   if (ob1) ob1.style.display = "none";
   if (ob2)	ob2.style.display = "none";
   if (ob4) ob4.style.height  = "90px";
   if (ob4) ob4.style.width   = "";   

   if (ob3 && GLV_MonsterEndBnr != "")
   {
	 ob3.style.display = "";	   
	 ob3.innerHTML = GLV_MonsterEndBnr;
   }	
   fGL_OpenCloseOzen(0,0);
   fGL_OpenCloseCorner(0);   
   fGL_ShowPageElements();   
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            OZEN                                        @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
   var GLOZEN_obL = false;
   var GLOZEN_obR = false; 
//-----------------------------------------------------------------------   
   var GLOZEN_FooterHeight = 0;
   var GLOZEN_OzenPos      = 0;
//============================================================================
// Function fOzen_startBanners
//----------------------------------------------------------------------------
// Function performs startup operations for showing banners 
//============================================================================   
function fOzen_startBanners()
{
 //..........................................................
   if ( GLV_AdmTest != "" ) { GLV_HideLeftOzen = 0; GLV_HideRightOzen = 0; }
 //..........................................................
   if ( GLV_HideLeftOzen == 1 && GLV_HideRightOzen == 1 ) return;
 //..........................................................
   GLOZEN_OzenPos = fOzen_GetOzenPos();  //  0 - Normal  Position
                                         //  1 - Reverse Position 
 //..........................................................
   fOzen_ShowLeftBanner();
   fOzen_ShowRightBanner();
 //..........................................................
   GLOZEN_obL = document.getElementById("crrossSiteBanDiv");
   GLOZEN_obR = document.getElementById("crrossSiteBanRightDiv"); 
 //..........................................................
   try { if ( GLV_BlockOzenLeft  == 1 && GLOZEN_obL) GLOZEN_obL.style.display = "none"; } catch(e){}
   try { if ( GLV_BlockOzenRight == 1 && GLOZEN_obR) GLOZEN_obR.style.display = "none"; } catch(e){}
 //..........................................................
   window.onscroll = fOzen_ShowOverFooter;
 //..........................................................
   fOzen_changePageStyle();
 //..........................................................
}
//=======================================================================
// Function fOzen_GetOzenPos()
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function uses global variables: GLV_TestOzen, GLV_FullPath
//-----------------------------------------------------------------------
//  Function returns Banners Position ( 0 - Normal, 1 - Reverse )
//=======================================================================
function fOzen_GetOzenPos()
{
   var showBanArr = new Array( "[%].tapuz.co.il/communa/default.asp", 
                               "[%].tapuz.co.il/communa",                                   
                               "[%].tapuz.co.il/communa/",                                                                     
                               "[%].tapuz.co.il/blog/default.asp",    
                               "[%].tapuz.co.il/blog",    
                               "[%].tapuz.co.il/blog/",                                                                        
	                           "[%].tapuz.co.il/chat/default.asp",
	  	                       "[%].tapuz.co.il/chat",
	  	                       "[%].tapuz.co.il/chat/",	  	                          
                               "[%].tapuz.co.il/forums/default.asp",   
                               "[%].tapuz.co.il/forums",   
                               "[%].tapuz.co.il/forums/",                                     
                               "[%].tapuz.co.il/tapuzforum/default.asp", 		   	           
                               "[%].tapuz.co.il/tapuzforum",
                               "[%].tapuz.co.il/tapuzforum/"
		  	                 );
 //..........................................................
   if ( GLV_TestOzen != "" ) return 1;
   if ( fGL_SrchStrInArray( showBanArr, GLV_FullPath ) >= 0 ) return 1;   
   return 0;
}
//=======================================================================
function fOzen_changePageStyle()
{
 //..........................................................   
    if ( screen.width > 1050 ) return;
 //..........................................................
    if ( fGL_isTapuzHP() == 1 && ( GLV_PageName == "" || GLV_PageName == "default.aspx" ) )
    {
      $(".nd_MLinksBox"     ).css("margin-left", "125px");
      $(".MenuStats .holder").css("margin-left", "125px");
      $(".contnetSite"      ).css("margin-left", "125px");
      return;
    }
 //..........................................................    
    var arDynDiv = new Array("divHPPage","MainDiv");
    for(var i=0; i < arDynDiv.length; i++)
    {    
      var obd = document.getElementById(arDynDiv[i]);
      if (obd)
      { 
         if ( GLOZEN_OzenPos == 1 ) 
            obd.style.marginRight = "20px";     
         else
            obd.style.marginLeft  = "20px";
      }      
    }
 //..........................................................
    try {
      var arr = document.getElementsByTagName("div");
      for(var i=0; i < arr.length; i++)
         if (arr[i].className == "mainPage") 
         {
           if ( GLOZEN_OzenPos == 1 )
              arr[i].style.marginRight = "20px"; 
           else
              arr[i].style.marginLeft  = "20px";               
           break; 
         }
    } catch(ex){}
 //..........................................................
}
//=======================================================================
function fOzen_ShowOverFooter()
{
   try 
   { 
        if ( GLV_BlockOzenLeft == 0 || GLV_BlockOzenRight == 0 )
        {
         //..........................................        
          if (!document.documentElement.scrollTop)
              var scrollY = parseInt(document.body.scrollTop);
          else
              var scrollY = parseInt(document.documentElement.scrollTop);
         //..........................................		
	      var showPageHeight = fGL_GetPageSize()[1] - GLOZEN_FooterHeight - scrollY;
         //..........................................
	      if (GLOZEN_obL && GLV_BlockOzenLeft == 0)
	      {
	         var obH = parseInt(GLOZEN_obL.style.height) + parseInt(GLOZEN_obL.style.top);
	         
		     if ( obH > showPageHeight )
		        GLOZEN_obL.style.display = "none";
	         else
	            GLOZEN_obL.style.display = "";
	      }
         //..........................................	      
	      if (GLOZEN_obR && GLV_BlockOzenRight == 0)
	      {
	         var obH = parseInt(GLOZEN_obR.style.height) + parseInt(GLOZEN_obR.style.top);
	         
		     if ( obH > showPageHeight )
		        GLOZEN_obR.style.display = "none";
	         else
	            GLOZEN_obR.style.display = "";
	      }
         //..........................................	      
	    }       
   } catch(e){}
}
//=======================================================================
// Function fOzen_GetShowBannerFlag 
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function uses global variables: 
//     GLV_Cookie_MyTheme, GLV_FullPath, GLOZEN_FooterHeight, GLV_IsAbs
//-----------------------------------------------------------------------
//  pBnrType: 1 - Left Ozen, 2 - Right Ozen 
//-----------------------------------------------------------------------
//  Function returns Show Banner Flag ( 0 - do not show banner, 1 - show banner )
//=======================================================================
function fOzen_GetShowBannerFlag(pBnrType)
{
 //.............................................................. 
 if ( pBnrType == 2 ) 
   var showBanArr = new Array( "[%]/sf.tapuz.co.il[%]" );     
 else
   var showBanArr = new Array( "[%]/sf.tapuz.co.il[%]", 
                               "[%]/sc.tapuz.co.il[%]", 
                               "[%]/sfdev.tapuz.co.il[%]", 
                               "[%]/scdev.tapuz.co.il[%]", 
                               "[%].tapuz.co.il/hp1.asp",              
                               "[%].tapuz.co.il",                                                
                               "[%].tapuz.co.il/",
                               "[%].tapuz.co.il/hp1pop/default.asp",              
                               "[%].tapuz.co.il/hp1pop",                                                
                               "[%].tapuz.co.il/hp1pop/",
                               "[%].tapuz.co.il/hp_video3.asp",                               
                               "[%].tapuz.co.il/communa/default.asp", 
                               "[%].tapuz.co.il/communa",                                   
                               "[%].tapuz.co.il/communa/",                                                                     
                               "[%].tapuz.co.il/blog/default.asp",    
                               "[%].tapuz.co.il/blog",    
                               "[%].tapuz.co.il/blog/",                                                                        
	                           "[%].tapuz.co.il/chat/default.asp",
	  	                       "[%].tapuz.co.il/chat",
	  	                       "[%].tapuz.co.il/chat/",	  	                          
                               "[%].tapuz.co.il/forums/default.asp",   
                               "[%].tapuz.co.il/forums",   
                               "[%].tapuz.co.il/forums/",                                     
                               "[%].tapuz.co.il/albums/default.asp",   
                               "[%].tapuz.co.il/albums",   
                               "[%].tapuz.co.il/albums/",                                     
                               "[%].tapuz.co.il/tapuzforum/default.asp", 		   	           
                               "[%].tapuz.co.il/tapuzforum",
                               "[%].tapuz.co.il/tapuzforum/",                                  
                               "[%].tapuz.co.il/tapuzforum/default2009.asp", 		   	                                                                                                                                                        
		  	                   "[%].tapuz.co.il/blog/default2009.asp", 
		  	                   "[%].tapuz.co.il/blog/default_b.asp", 
	  	                       "[%].tapuz.co.il/food/default.asp",
	  	                       "[%].tapuz.co.il/food",
	  	                       "[%].tapuz.co.il/food/",	  	                          
	  	                       "[%].tapuz.co.il/bike/default.asp",
	  	                       "[%].tapuz.co.il/bike",
	  	                       "[%].tapuz.co.il/bike/",
	  	                       "[%].tapuz.co.il/index/index.asp",
	  	                       "[%].tapuz.co.il/index",
	  	                       "[%].tapuz.co.il/index/[%]",
	  	                       "[%].tapuz.co.il/olamot/loggedout.aspx",
	  	                       "[%].tapuz.co.il/olamot/default.aspx",	  	                       
	  	                       "[%].tapuz.co.il/olamot",
	  	                       "[%].tapuz.co.il/olamot/",
                               "[%].tapuz.co.il/homepagesnet/default.aspx",
                               "[%].tapuz.co.il/homepagesnet",
                               "[%].tapuz.co.il/homepagesnet/",            
                               "[%].tapuz.co.il/default.aspx"                                 
		  	                 );
 //.............................................................. 
    if ( screen.width < 1000 ) return 0;
    var i = fGL_SrchStrInArray( showBanArr, GLV_FullPath );
    if ( i < 0 ) return 0;
    if ( fGL_isHPDomain()   == 0          && i >  3 ) return 0;    
    if ( GLV_Cookie_MyTheme == "themeNrg" && i > 13 ) return 0;
 //..............................................................      
    GLOZEN_FooterHeight = 0;                               // Old Footer
         if (i == 0 || i == 2) GLOZEN_FooterHeight = 400;  // Text Forums
    else if (i >  3 && i < 11) GLOZEN_FooterHeight = 480;  // Tapuz HP
    else if (i > 10 && i < 32) GLOZEN_FooterHeight = 650;  // New Footer 
    else if (i > 40 && i < 45) GLOZEN_FooterHeight = 420;  // ASP NET Footer     
    else if (i > 44)           GLOZEN_FooterHeight = 600;  // ASP NET Footer For New Tapuz HP        
 //..............................................................         
    return 1;
}
//=======================================================================
function fOzen_GetRMPage() 
{
 //....................................   
   var isHul = 0;
   try { isHul = notHulBanner; } catch(e){}
   if ( GLV_Hol != "" ) isHul = 1;     
 //....................................   
   var RMPage = "ozen.tapuz.co.il";
     
   if ( GLV_Domain == "sf.tapuz.co.il" )
      RMPage = "sf.tapuz.co.il"; 
   else if ( GLV_IsTapuzHP == 1 )
   {
      RMPage = "home.tapuz.co.il";
      if ( isHul == 1 ) RMPage = "ozen.tapuz.co.il/hol"
   }
   else if ( GLV_IsMitparPage == 1 ) 
      RMPage = "adv9.tapuz.co.il";

   RMPage = '"' + RMPage + '"';  
 //....................................
   if ( GLV_AdmTest != "" )
   {
      RMPage = "realMediaBannerUrl"
      if ( GLV_AdmTest == "OZEN" && GLV_AdmPage != "" ) RMPage = '"' + GLV_AdmPage + '"';   
   }
 //..............................................................   
   return RMPage; 
}  
//=======================================================================
function fOzen_GetStartParam( obW, obH, obPos, obDyn, obAlgn, obSpace )
{
  var winW = fGL_GetPageSize()[2];
  var winH = fGL_GetPageSize()[3];  
//---------------------------------------      
  var vTop = parseInt(obPos);
  if (vTop < 0 && vTop != -1 && vTop != -2) vTop = -1;
//.......................................
  if (vTop == -1)
      vTop = ( winH - parseInt(obH) ) / 2;
  else if (vTop == -2)
      vTop =   winH - parseInt(obH);
//.......................................      
  if ( vTop < 0 ) vTop = 0;
//---------------------------------------    
  var vPos = "absolute";
  if (obDyn == 1 && !GLV_IsAbs) vPos = "fixed";      
//--------------------------------------- 
  var vMargin = 0;
  if (obSpace >= 0) vMargin = ( winW - 770 ) / 2 - obW - obSpace;
  if (vMargin < 0) vMargin = 0;
//---------------------------------------   
  if ( obAlgn.toLowerCase() != "right" ) obAlgn = "left";      
  vAlgn = obAlgn + ":" + vMargin + "px; float:" + obAlgn + ";";
//---------------------------------------   
  return [vTop,vPos,vAlgn];
}
//=======================================================================         
// fOzen_ShowLeftBanner - Shows the Left Banner
//-----------------------------------------------------------------------
// Parameter "obL_StartPos" (start top position of Left Ozen):
//    >= 0  - top position in pixels;  
//      -1  - middle of the window;  
//      -2  - bottom of the window;
//-----------------------------------------------------------------------
// Parameter "obL_Dynamic":
//    0 - static  banner (does not change  top position relatively to the page)  
//    1 - dynamic banner (         changes top position relatively to the page)
//=======================================================================   
function fOzen_ShowLeftBanner() 
{
 //..........................................................
   if ( GLV_HideLeftOzen == 1 || fOzen_GetShowBannerFlag(1) == 0 ) return;
 //..........................................................
   var ob = document.getElementById("crrossSiteBanDiv");   
   if (ob) { ob.style.display = "none"; ob.id += "Old"; }   
 //..........................................................       
   var obL_RMPage   = fOzen_GetRMPage();
   var obL_RMPos    = "x63";   
   var obL_Width    = 120;
   var obL_Height   = 600;
   var obL_StartPos =   0;
   var obL_Dynamic  =   1;
   var obL_Align    = "left";
   var obL_Space    =  -1;   
 //..........................................................        
   //if ( GLOZEN_OzenPos == 1 ) { obL_StartPos = 70; obL_Dynamic = 0; obL_Align = "right"; obL_Space = 50; }
   if ( GLOZEN_OzenPos == 1 ) { obL_Align = "right"; }   
 //..........................................................       
   var arPar = fOzen_GetStartParam( obL_Width, obL_Height, obL_StartPos, obL_Dynamic, obL_Align, obL_Space );
 //..........................................................           
   document.write ( 
     '<div id="crrossSiteBanDiv" style="position:' + arPar[1] + '; top:' + arPar[0] + 'px; ' + arPar[2] + ' z-index:3; width:' + obL_Width + 'px; height:' + obL_Height + 'px;">\n' +
     '<scr' + 'ipt type="text/javascript">\n' +
     '<!--\n' +
     ' DisplayAds( ' + obL_RMPage + ', "' + obL_RMPos + '", ' + obL_Width + ', ' + obL_Height + ' ); \n' +
     '//-->\n' +
     '</scr' + 'ipt>\n' +
     '</div>\n' 
   );
}
//=======================================================================         
// fOzen_ShowRightBanner - Shows the Right Banner
//-----------------------------------------------------------------------
// Parameter "obR_StartPos" (start top position of Right Ozen):
//    >= 0  - top position in pixels;  
//      -1  - middle of the window;  
//      -2  - bottom of the window;
//-----------------------------------------------------------------------
// Parameter "obR_Dynamic":
//    0 - static  banner (does not change  top position relatively to the page)  
//    1 - dynamic banner (         changes top position relatively to the page)
//-----------------------------------------------------------------------
// Parameter "obR_ShowType":
//    1 - Real Media Banner 
//    2 - Flash Banner
//    3 - Image + Link
//    4 - Only Image
//    5 - Tags
//=======================================================================   
function fOzen_ShowRightBanner() 
{
 //..........................................................
   if ( GLV_HideRightOzen == 1 || fOzen_GetShowBannerFlag(2) == 0 ) return;
 //..........................................................
   var ob = document.getElementById("crrossSiteBanRightDiv");   
   if (ob) { ob.style.display = "none"; ob.id += "Old"; }   
 //..........................................................    
    var obR_RMPage   = fOzen_GetRMPage();
    var obR_RMPos    = "x62";   
    var obR_Width    = 95;
    var obR_Height   = 475;
    var obR_Img      = "http://www.tapuz.co.il/banners/sf120x600.swf";
    var obR_Link     = "";
    var obR_StartPos =   0;
    var obR_Dynamic  =   0;
    var obR_ShowType =   2;
    var obR_Align    = "right";
    var obR_Space    =  -1;          
 //..........................................................           
  //if ( GLOZEN_OzenPos == 1 ) { obR_StartPos = 70; obR_Align = "left"; obR_Space = 50; }   
    if ( GLOZEN_OzenPos == 1 ) { obR_Align = "left"; }       
 //..........................................................       
    var arPar = fOzen_GetStartParam( obR_Width, obR_Height, obR_StartPos, obR_Dynamic, obR_Align, obR_Space );  
 //..........................................................           
    document.write ( '<div id="crrossSiteBanRightDiv" style="position:' + arPar[1] + '; top:' + arPar[0] + 'px; ' + arPar[2] + ' z-index:20000; width:' + obR_Width + 'px; height:' + obR_Height + 'px;">\n' );

    if ( obR_ShowType == 1 )
          document.write ( 
            '<scr' + 'ipt type="text/javascript">\n' +
            '<!--\n' +
	        ' DisplayAds( ' + obR_RMPage + ', "' + obR_RMPos + '", ' + obR_Width + ', ' + obR_Height + ' ); \n' +
            '//-->\n' +
            '</scr' + 'ipt>\n'
          );  
    else if ( obR_ShowType == 2 )  
          document.write(
            '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' +
            '        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ' +
            '        width="' + obR_Width + '" height="' + obR_Height + '" ' +
            '        id="side_bannerA" name="side_bannerA" ' +
            '        align="middle">\n' +
            ' <param name="allowScriptAccess" value="always"      />\n' +
            ' <param name="allowFullScreen"   value="false"       />\n' +
            ' <param name="movie"             value="' + obR_Img + '" />\n' +
            ' <param name="quality"           value="high"        />\n' +
	        ' <param name="wmode"             value="transparent" />\n' +      
            ' <embed src="' + obR_Img + '" ' +
            '        name="side_banner" ' +
            '        width="' + obR_Width + '" height="' + obR_Height + '" ' +
            '        allowScriptAccess="always" ' +
            '        allowFullScreen="false" ' +
            '        quality="high" ' +
            '        wmode="transparent" ' +	
            '        align="middle" ' +
            '        type="application/x-shockwave-flash" ' +
            '        pluginspage="http://www.macromedia.com/go/getflashplayer" />\n' +
            '</object>\n'
          );
    else if ( obR_ShowType == 3 )  
          document.write( '<a href="' + obR_Link + '"><img src="' + obR_Img + '" width="' + obR_Width + '" height="' + obR_Height + '" border="0" alt=""/></a>' );
    else if ( obR_ShowType == 4 )  
          document.write( '<img src="' + obR_Img + '" width="' + obR_Width + '" height="' + obR_Height + '" border="0" alt=""/>' );
    else if ( obR_ShowType == 5 )  
          document.write( 
            '<!--IFRAME Tag (General Redirect) // Tag for network 1158: Publicis Israel // Website: Tapuz // Page: Home page // Placement: Home page tower right 80x360 (3546683) // created at: Dec 7, 2011 11:53:56 AM   -->' +
            '<IFRAME WIDTH="80" HEIGHT="360" SCROLLING="No" FRAMEBORDER="0" MARGINHEIGHT="0" MARGINWIDTH="0" SRC="http://adserver.adtech.de/adiframe|3.0|1158|3546683|0|0|ADTECH;AdId=7123201;BnId=-1;;target=_blank;misc=[timestamp];rdclick=">' +
            '<scr' + 'ipt language="javascript" src="http://adserver.adtech.de/addyn|3.0|1158|3546683|0|0|ADTECH;AdId=7123201;BnId=-1;;loc=700;target=_blank;misc=[timestamp];rdclick="></scr' +'ipt>' +
            '<noscr' + 'ipt>' +
            '<a href="http://adserver.adtech.de/adlink|3.0|1158|3546683|0|0|ADTECH;AdId=7123201;BnId=-1;;loc=300;misc=[timestamp]" target="_blank;AdId=7123201;BnId=-1;">' +
            '<img src="http://adserver.adtech.de/adserv|3.0|1158|3546683|0|0|ADTECH;loc=300;misc=[timestamp]" border="0" width="0" height="0">' +
            '</a>' +
            '</noscr' + 'ipt>' +
            '</IFRAME>' +
            '<!-- End of IFRAME Tag -->' );

    document.write ( '</div>\n' );
}
//=======================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            VILON                                       @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//=================================================================================
// Function fVilon_GetShowBannerFlag 
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function returns Show Banner Flag ( 0 - do not show banner, 1 - show banner )
//-----------------------------------------------------------------------
//  cookiePath: "/" - By Domain,  "" - By Current Folder
//=======================================================================
function fVilon_GetShowBannerFlag()
{
 //.............................................................. 
    var showBanArr = new Array( "[%].tapuz.co.il/hp1.asp",              
                                "[%].tapuz.co.il",                                                
                                "[%].tapuz.co.il/",                                                                                  
                                "[%].tapuz.co.il/communa/default.asp", 
                                "[%].tapuz.co.il/communa",                                   
                                "[%].tapuz.co.il/communa/",                                                                     
                                "[%].tapuz.co.il/blog/default.asp",    
                                "[%].tapuz.co.il/blog",    
                                "[%].tapuz.co.il/blog/",                                                                        
 	                            "[%].tapuz.co.il/chat/default.asp",
	  	                        "[%].tapuz.co.il/chat",
	  	                        "[%].tapuz.co.il/chat/",	  	                          
                                "[%].tapuz.co.il/forums/default.asp",   
                                "[%].tapuz.co.il/forums",   
                                "[%].tapuz.co.il/forums/",                                     
                                "[%].tapuz.co.il/tapuzforum/default.asp" 		   	           
		  	                  );
 //..............................................................   
   if ( GLV_AdmTest == "VILON" || GLV_TestVilon != "" ) return 1;
 //..............................................................		  	                  
 //var CookieName   = "vilonAlreadyDisplayed";
   var cookieName   = "VilonShow";
   var daysToExpire = 1/8;
   var cookieDomain = "tapuz.co.il";
   var cookiePath   = "/"; 
   var cookieValue  = "1"
 //..............................................................
   var c = fGL_ReadCookie( cookieName, "" );
   var i = fGL_SrchStrInArray( showBanArr, GLV_FullPath );
 //..............................................................         
   if ( c == cookieValue || i < 0 ) return 0;
 //..............................................................             
   fGL_SetCookie( cookieName, cookieValue, daysToExpire, cookieDomain, cookiePath );
 //..............................................................                
   return 1;
}
//=================================================================================
function fVilon_showVilonBanner()
{
	if ( fVilon_GetShowBannerFlag() == 0 || document.getElementById("vilonBannerDiv") ) return;
  //----------------------------------------------------------
	fGL_HidePageElements();
  //----------------------------------------------------------					
    var screenW = fGL_GetPageSize()[2];
    var screenH = fGL_GetPageSize()[3];    
  //----------------------------------------------------------			
  //var flashN = "http://ad.yieldmanager.com/imp?z=0&Z=0x0&s=295630&y=23&w=770&h=450&t=3";
	var flashN = "/vilonBanner/War_Ynet_mishtaletet_770x450_Tapuz_allover_6KRXQZ_2.SWF";
    var flashW = 770;
	var flashH = 450;
	var flathT = 0;
	var flashL = (screenW - flashW) / 2;
	if (flashL < 0) flashL = 0;
  //----------------------------------------------------------						
    var showType = 1;    // 1 - flash,  2 - iframe 
  //----------------------------------------------------------			
	var flashStyle = ' style="z-index:30000; position:absolute; left:' + flashL + 'px; top:' + flathT + 'px;" ';
  //----------------------------------------------------------
	if ( showType == 1)
	   document.write( 
	    '<div id="vilonBannerDiv">' + 
        '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' + flashStyle + 
        '        codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ' +
        '          ID="vilonObject" ' +
        '        NAME="vilonObject" ' +  
        '        WIDTH="' + flashW + '" HEIGHT="' + flashH + '">\n' +
        ' <PARAM NAME="movie"   VALUE="' + flashN + '">\n' +
        ' <PARAM NAME="play"    VALUE="true">\n' +
        ' <PARAM NAME="loop"    VALUE="true">\n' +
        ' <PARAM NAME="menu"    VALUE="false">\n' +
        ' <PARAM NAME="wmode"   VALUE="transparent">\n' +
        ' <PARAM NAME="quality" VALUE="high">\n' +
        ' <EMBED name="vilonEmbed" ' +
        '        WIDTH="' + flashW + '" HEIGHT="' + flashH + '" ' +
        '        SRC="' + flashN + '" ' +
        '        type=application/x-shockwave-flash ' +
        '        SWLiveConnect=TRUE ' +
        '        play=true ' +
        '        loop=true ' +
        '        menu=false ' +
        '        wMode=transparent ' +
        '        quality=best ' +
        '        pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">\n' +
        ' </EMBED>\n' +
        '</OBJECT>\n' +
    	'</div>' );
	else if ( showType == 2)	
	   document.write( 			
	    '<div id="vilonBannerDiv">' + 			  
	    '<iframe allowtransparency="true" ' + flashStyle + ' src="' + flashN + '" ' +
	    '  width="' + flashW + '" Height="' + flashH + '" scrolling="no" frameborder="0">' +
	    '</iframe>' +
		'</div>' );
}
//============================================================================
function hideVilonBanner()
{
	try{ document.getElementById("vilonBannerDiv").style.display = "none"; } catch(expt){}
	fGL_ShowPageElements();
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            HP VIDEO                                    @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
   var GLHPV_HPVideoPath = GLV_Protocol + GLV_Domain + "/tapuzglobals/asp/hpvideo/";
   var introclip   = "";
   var linkpreroll = "";
//-----------------------------------------------------------------------
   var GLHPV_IsDemo = 0;    
   if ( GLV_PageName == "hp_video3.asp" ) GLHPV_IsDemo = 1; 
//-----------------------------------------------------------------------
   var GLHPV_IsHPVideo = fHPVideo_GetShowFlag();
//=======================================================================      
function fHPVideo_open() 
{
   document.write( '<!-- HP VIDEO -->\n' +
                   '<div id="divInfoBG"></div>\n' +
                   '<div id="divVideo"></div>\n' +
                   '<link rel="stylesheet" href="' + GLHPV_HPVideoPath + 'style.css" type="text/css" />\n' );

   if (GLHPV_IsDemo == 1)
   {
     introclip   = GLHPV_HPVideoPath + "videos/SAMSUNG_flix_pre.flv";
     linkpreroll = "http://www.cellcom.co.il/shop/phones/sumsung_galaxy_tab/pages/default.aspx";
     fHPVideo_start();
   }
   else if ( GLHPV_IsHPVideo == 1 ) 
     fGL_DisplayAdsByLinkType( "www.tapuz.co.il/hpvideomit", "x14", 1);
}   
//=======================================================================
// Function fHPVideo_GetShowFlag 
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function uses global variables: GLHPV_IsDemo, GLV_TestHPVideo, GLV_FullPath
//-----------------------------------------------------------------------
//  Function returns Show Flag ( 0 - not show, 1 - show )
//=======================================================================
function fHPVideo_GetShowFlag()
{
 //.............................................................. 
    var showArr = new Array( "[%].tapuz.co.il/hp1.asp",              
                             "[%].tapuz.co.il",                                                
                             "[%].tapuz.co.il/",                                                                                  
                             "[%].tapuz.co.il/communa/default.asp", 
                             "[%].tapuz.co.il/communa",                                   
                             "[%].tapuz.co.il/communa/",                                                                     
                             "[%].tapuz.co.il/blog/default.asp",    
                             "[%].tapuz.co.il/blog",    
                             "[%].tapuz.co.il/blog/",                                                                        
	                         "[%].tapuz.co.il/chat/default.asp",
	                         "[%].tapuz.co.il/chat",
	                         "[%].tapuz.co.il/chat/",	  	                          
                             "[%].tapuz.co.il/forums/default.asp",   
                             "[%].tapuz.co.il/forums",   
                             "[%].tapuz.co.il/forums/",                                     
                             "[%].tapuz.co.il/tapuzforum/default.asp",                                     
                             "[%].tapuz.co.il/tapuzforum",                                     
                             "[%].tapuz.co.il/tapuzforum/"
	                       );
 //..............................................................  
    var c = fGL_ReadCookie( "HPVideo", "" );
    var i = fGL_SrchStrInArray( showArr, GLV_FullPath );
    var j = fHPVideo_IsShow();
 //..............................................................  
    if ( GLHPV_IsDemo == 1 || GLV_TestHPVideo != "" || (c != "HPVideo123" && i >= 0 && j==1) ) return 1;
 //..............................................................      
    return 0;
}
//=======================================================================
function fHPVideo_IsShow() 
{
  try { var TopURL  = top.window.location.href.toLowerCase(); } catch(e){return 0;}
  var TopPage = fGL_GetLinkParts(TopURL)[3];

  if ( this == parent           || 
       TopPage == ''            ||
       TopPage == 'forums.htm'  || 
       TopPage == 'default.asp' || 
       TopPage == 'hp1.asp'      )
     return 1;
  else   
     return 0;   
}
//=======================================================================
function fHPVideo_start() 
{
  if ( GLHPV_IsHPVideo == 0 || introclip == "" ) return;
  
  var objBG    = document.getElementById("divInfoBG");    
  var objPopUp = document.getElementById("divVideo"); 

  if (objBG && objPopUp)
  {
    if (GLHPV_IsDemo == 0) fGL_SetCookie( "HPVideo", "HPVideo123", 1/3, "tapuz.co.il", "/" );

    fGL_HidePageElements();    

    if (GLV_IsAbs) 
    {  
      objBG.style.position    = "absolute";
      objPopUp.style.position = "absolute";
    } 
    objBG.style.display    = "block"; 
    objPopUp.style.display = "block";

    fHPVideo_resize( 229, 195, 458, 390, 10, 8, 5);
  }
}
//=======================================================================
function fHPVideo_close() 
{
   var objPopUp = document.getElementById("divVideo");
   if (objPopUp) objPopUp.innerHTML = "";
    
   fHPVideo_move( 10, 10, 0, 5);    
}
//=======================================================================
function fHPVideo_close2() 
{
   var objCloseBtn = document.getElementById("closeBtn");
   if (objCloseBtn) objCloseBtn.style.display = "none";
   
   var objFrmVideo = document.getElementById("frmVideo");
   if (objFrmVideo) objFrmVideo.style.display = "none";
   
   fHPVideo_move( 10, 10, 0, 5);
}
//=======================================================================
function fHPVideo_end() 
{ 
   var objBG    = document.getElementById("divInfoBG");    
   var objPopUp = document.getElementById("divVideo");
   
   if (objPopUp) objPopUp.style.display = "none";  
   if (objBG)    objBG.style.display    = "none";	  
   
   fGL_ShowPageElements();   
}
//=======================================================================
function fHPVideo_resize( minW, minH, maxW, maxH, stepW, stepH, timeout) 
{
    if ( minW >= maxW && minH >= maxH ) 
    {
      fHPVideo_play();
      return;
    }

    var ob = document.getElementById("divVideo");

    var winW = (window.innerWidth  ? window.innerWidth  : (document.documentElement.clientWidth  ? document.documentElement.clientWidth  : document.body.offsetWidth ));
    var winH = (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));

    var newW = minW + stepW;
    var newH = minH + stepH;
  
    if (newW > maxW) newW = maxW;
    if (newH > maxH) newH = maxH;
    
    var newTop  = parseInt( ( winH - parseInt(newH) ) / 2 );
    var newLeft = parseInt( ( winW - parseInt(newW) ) / 2 );
        
    if ( newTop  < 0 ) newTop  = 0;
    if ( newLeft < 0 ) newLeft = 0;
        
    ob.style.width  = newW    + "px";
    ob.style.height = newH    + "px";    
    ob.style.top    = newTop  + "px";
    ob.style.left   = newLeft + "px";    
    
    setTimeout('fHPVideo_resize( ' + newW + ', ' + newH + ', ' + maxW + ', ' + maxH + ', ' + stepW + ', ' + stepH + ', ' + timeout + ');', timeout);
}
//=======================================================================
function fHPVideo_play() 
{
    var PageURL = GLHPV_HPVideoPath + 'videoEmbed.asp' +
                  '?videourl=' + escape(introclip) +
                  '&linkurl='  + escape(linkpreroll);
                  
    var PopUpW = 458;
    var PopUpH = 390;

    var objPopUp = document.getElementById("divVideo");
    if (objPopUp) 
        objPopUp.innerHTML = 
         '<div onclick="fHPVideo_close();" id="closeBtn" title="свеш">' +
         '<img src="' + GLHPV_HPVideoPath + 'close.png" border="0" alt="" />' +
         '</div>' +
         '<iframe id="frmVideo" src="' + PageURL + '" width="' + PopUpW + '" height="' + PopUpH + 
         '" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no>' +
         '</iframe>';
}
//=======================================================================
function fHPVideo_move( stepTop, stepLeft, count, timeout) 
{
    if (count < 1) 
    {
      fHPVideo_end();
      return;
    }

    var ob = document.getElementById("divVideo");

    var newTop  = parseInt(ob.style.top)  + stepTop;
    var newLeft = parseInt(ob.style.left) + stepLeft;
        
    ob.style.top  = newTop  + "px";
    ob.style.left = newLeft + "px";    
    
    setTimeout('fHPVideo_move( ' + stepTop + ', ' + stepLeft + ', ' + (count-1) + ', ' + timeout + ');', timeout);
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                      POP UNDER, MADBEKA, TSAF                          @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
   var GLPU_PopRMediaURL = "www.tapuz.co.il";    
   var GLPU_PopUnderShow = "";    
//=======================================================================
// Function fPU_CallPopUp 
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function sets value of global variable "GLPU_PopRMediaURL"
//=======================================================================
function fPU_CallPopUp()
{
 //.............................................................. 
    if ( blockPopups == 1 ) return;
 //.............................................................. 
    var showBanArr = new Array( "[%]/sf.tapuz.co.il[%]",
                                "[%]/sfdev.tapuz.co.il[%]",
    	  	                    "[%]/sc.tapuz.co.il[%]",
    	  	                    "[%]/scdev.tapuz.co.il[%]",
                                "[%].tapuz.co.il/forums2008/forumpage.aspx",
                                "[%].tapuz.co.il/forums2008/viewmsg.aspx",                                                                                                   
                                "[%].tapuz.co.il/forums/default.asp",   
                                "[%].tapuz.co.il/forums",   
                                "[%].tapuz.co.il/forums/",
                                "[%].tapuz.co.il/tapuzforum/default.asp",
                                "[%].tapuz.co.il/tapuzforum",
                                "[%].tapuz.co.il/tapuzforum/",                                                                
 	                            "[%].tapuz.co.il/communa/default.asp",
	  	                        "[%].tapuz.co.il/communa",
	  	                        "[%].tapuz.co.il/communa/",	  	                          
                                "[%].tapuz.co.il/communa[%]", 
 	                            "[%].tapuz.co.il/blog/default.asp",
	  	                        "[%].tapuz.co.il/blog",
	  	                        "[%].tapuz.co.il/blog/",	  	                          
                                "[%].tapuz.co.il/blog/userblog.asp",    
                                "[%].tapuz.co.il/blog/viewentry.asp",                                    
 	                            "[%].tapuz.co.il/chat/default.asp",
	  	                        "[%].tapuz.co.il/chat",
	  	                        "[%].tapuz.co.il/chat/",	  	                          
 	                            "[%].tapuz.co.il/albums/default.asp",
	  	                        "[%].tapuz.co.il/albums",
	  	                        "[%].tapuz.co.il/albums/",	  	                          
                                "[%].tapuz.co.il/food/default.asp",   
                                "[%].tapuz.co.il/food",   
                                "[%].tapuz.co.il/food/",                                     
                                "[%].tapuz.co.il/bike/default.asp",   
                                "[%].tapuz.co.il/bike",   
                                "[%].tapuz.co.il/bike/",                                     
	  	                        "[%].tapuz.co.il/index/index.asp",
	  	                        "[%].tapuz.co.il/index",
	  	                        "[%].tapuz.co.il/index/",	  	                        
	  	                        "[%].tapuz.co.il/index/[%]",
                                "[%].tapuz.co.il/blog/net/userblog.aspx",    
                                "[%].tapuz.co.il/blog/net/viewentry.aspx",                                    
                                
   	                            "[%].tapuz.co.il/olamot/default.aspx",
	  	                        "[%].tapuz.co.il/olamot",
	  	                        "[%].tapuz.co.il/olamot/",	  	                          
                                "[%].tapuz.co.il/olamot[%]", 

   	                            "[%].tapuz.co.il/tapuzsport/default.aspx",
	  	                        "[%].tapuz.co.il/tapuzsport",
	  	                        "[%].tapuz.co.il/tapuzsport/",	  	                          
                                "[%].tapuz.co.il/tapuzsport[%]",
                                
                                "[%].tapuz.co.il/hp1pop/default.asp",              
                                "[%].tapuz.co.il/hp1pop",                                                
                                "[%].tapuz.co.il/hp1pop/"
 
		  	                  );
 //.............................................................. 
 // showType: 
 //  0 - PopUnder when page is clicked
 //  1 - Madbeka ( Home  Pages ) 
 //  3 - Madbeka ( Inner Pages ) 
 //  4 - PopUnder automatic
 //  5 - Tsaf
 //.............................................................. 
    var showTypeArr = new Array( [1,4,0],
                                 [1,4,0],
    	  	                     [1,4,0],
    	  	                     [1,4,0],
                                 [4,0],
                                 [4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
                                 [5,1,4,0],
	  	                         [5,1,4,0],
                                 [3,4,0],
 	                             [5,1,4,0],
	  	                         [5,1,4,0],
	  	                         [5,1,4,0],
                                 [3,4,0],
                                 [3,4,0],
   	                             [5,1,4,0],
	  	                         [5,1,4,0],
	  	                         [5,1,4,0],
   	                             [5,1,4,0],
	  	                         [1,4,0],
	  	                         [1,4,0],
                                 [1,4,0],
	  	                         [1,4,0],
	  	                         [1,4,0],
                                 [1,4,0],
	  	                         [1,4,0],
	  	                         [1,4,0],
                                 [1,4,0],
	  	                         [1,4,0],
	  	                         [1,4,0],
                                 [3,4,0],
                                 [3],
                                 [3],

                                 [],
                                 [],
                                 [],
                                 [],

                                 [1],
                                 [1],
                                 [1],
                                 [3],
                                 
                                 [1],
                                 [1],
                                 [1]
		  	                  );
 //..............................................................		  	                  
    var RMPageArr  = new Array( "www.tapuz.co.il/forums",                                                                                                                                   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/communa", 
                                "www.tapuz.co.il/communa",                                 
                                realMediaBannerUrl,   
                                realMediaBannerUrl,   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/forums",                                                                                                                                   
                                "www.tapuz.co.il/forums",   
                                "www.tapuz.co.il/communa", 
                                "www.tapuz.co.il/communa", 
                                "www.tapuz.co.il/communa",                                                                 
                                "www.tapuz.co.il/communa",                                                                                                 
                                "www.tapuz.co.il/blog",    
                                "www.tapuz.co.il/blog",    
                                "www.tapuz.co.il/blog",    
                                "www.tapuz.co.il/blog",    
                                "www.tapuz.co.il/blog",                                                                                                                                    
 	                            "www.tapuz.co.il/chat",
	  	                        "www.tapuz.co.il/chat",
	  	                        "www.tapuz.co.il/chat",	  	                          
 	                            "www.tapuz.co.il/albums",
	  	                        "www.tapuz.co.il/albums",
	  	                        "www.tapuz.co.il/albums",	  	                          
	  	                        "www.tapuz.co.il/food",
	  	                        "www.tapuz.co.il/food",	  	                          
                                "www.tapuz.co.il/food",   
                                "www.tapuz.co.il/bike",   
                                "www.tapuz.co.il/bike",                                     
                                "www.tapuz.co.il/bike",                                                                     
                                "www.tapuz.co.il/index",   
                                "www.tapuz.co.il/index",   
                                "www.tapuz.co.il/index",                                     
                                "www.tapuz.co.il/index",    
                                "www.tapuz.co.il/blog",    
                                "www.tapuz.co.il/blog",                                                                     
                                
                                "www.tapuz.co.il/olamot",   
                                "www.tapuz.co.il/olamot",   
                                "www.tapuz.co.il/olamot",                                     
                                "www.tapuz.co.il/olamot",    
                                                                                                 
                                "www.tapuz.co.il/tapuzsport",   
                                "www.tapuz.co.il/tapuzsport",   
                                "www.tapuz.co.il/tapuzsport",                                     
                                "www.tapuz.co.il/tapuzsport",

                                "www.tapuz.co.il",   
                                "www.tapuz.co.il",   
                                "www.tapuz.co.il"                                     
		  	                  );
 //..............................................................		  	                  
    var hideBanArr = new Array( "[%].tapuz.co.il/communa/communamaavaron.asp", 
                                "[%].tapuz.co.il/blog/maavaron.asp",    
                                "[%].tapuz.co.il/blog/net/maavaron.aspx",                                    
                                "[%].tapuz.co.il/forums2008/forummaavaron.aspx"   
 		  	                  );
 //..............................................................
    // 57,234,507,704,1288,1441 - ADULTS FORUMS		  	                   		  	                  
    var showInForums = ",57,234,507,704,1288,1441,6,7,8,10,12,13,14,17,18,19,20,21,22,23,25,26,27,32,33,53,58,59,60,61,62,69,70,71,72,73,78,79,81,88,89,91,92,94,99,103,110,113,119,121,125,127,130,131,133,141,145,146,147,148,149,151,154,156,159,160,161,164,165,167,168,170,171,175,178,181,182,184,185,186,187,190,192,193,194,197,199,200,206,207,208,210,211,213,216,218,219,222,224,225,228,229,231,232,233,235,236,237,241,245,247,248,251,252,253,254,255,256,261,269,274,275,277,279,283,287,288,289,293,295,296,297,299,306,308,309,310,311,312,316,320,321,324,325,328,329,330,331,332,335,337,339,342,343,345,350,352,353,354,358,359,363,366,369,370,376,377,379,380,382,383,384,386,387,388,389,393,400,402,404,410,413,414,415,416,417,419,420,421,423,424,430,431,434,438,439,440,441,442,444,447,449,453,456,457,458,465,467,468,472,476,477,479,480,482,483,485,487,491,492,493,494,495,497,500,502,504,505,506,509,511,516,517,523,526,553,554,555,558,563,565,570,571,577,579,584,585,588,589,593,596,603,604,608,610,614,615,616,617,620,621,623,626,629,631,636,637,640,643,649,654,656,657,659,660,663,664,665,667,668,675,677,683,685,689,690,691,693,695,697,702,703,707,710,711,713,716,718,719,720,724,725,730,731,732,736,740,742,744,747,752,753,755,762,763,764,770,771,774,780,781,782,783,784,785,786,788,790,791,793,794,799,800,802,807,809,810,811,817,820,830,831,833,834,839,840,842,848,850,851,853,856,858,859,862,863,865,866,867,868,871,875,882,887,893,898,900,905,907,908,910,911,912,913,915,919,920,921,929,930,931,935,936,937,938,939,940,941,943,947,948,950,952,953,956,964,965,966,969,972,974,978,979,980,982,991,996,1002,1003,1005,1007,1009,1012,1017,1018,1020,1023,1028,1030,1036,1039,1040,1045,1046,1050,1069,1073,1075,1076,1081,1083,1085,1087,1088,1089,1090,1095,1102,1104,1106,1108,1109,1113,1114,1117,1118,1120,1124,1127,1128,1135,1137,1149,1152,1153,1162,1164,1165,1166,1167,1168,1169,1171,1172,1173,1177,1188,1189,1193,1195,1197,1204,1206,1210,1212,1215,1216,1219,1220,1224,1233,1236,1240,1241,1244,1245,1246,1249,1250,1256,1257,1262,1263,1264,1271,1273,1277,1278,1279,1281,1282,1283,1284,1286,1287,1289,1291,1294,1295,1301,1303,1306,1310,1314,1315,1316,1319,1320,1322,1323,1328,1329,1331,1338,1341,1342,1343,1344,1346,1356,1357,1359,1360,1361,1365,1368,1370,1371,1372,1373,1374,1377,1378,1381,1389,1406,1410,1411,1416,1418,1420,1422,1423,1428,1429,1430,1433,1434,1435,1442,1444,1450,1452,1457,1462,1463,1464,1465,1466,1467,1469,1472,1474,1479,1480,1483,1484,1490,1501,1502,1506,1507,1509,1511,1512,1513,1515,1516,1517,1520,1521,1523,1527,1532,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1567,1568,1572,1573,1574,1582,1585,1587,1588,1589,1591,1594,1605,1606,1614,1618,1621,1624,1625,1629,1630,1631,1633,1638,1646,1647,1648,1653,1655,1657,1658,1659,1662,1664,1668,1669,1674,1677,1681,1682,1687,1692,1694,1695,1696,1697,1698,1700,1702,1705,1707,1708,1711,1712,1713,1715,1720,1721,1724,1728,1729,1731,1736,1737,1739,1741,1743,1745,1747,1748,1749,1750,1756,1757,1758,1762,1766,1767,1770,1771,1773,1774,1779,1780,1788,1791,1796,1797,1798,1800,1801,1803,1804,1806,1808,1813,1814,1815,1816,1817,1818,1822,1825,1826,1829,1832,1834,1837,1838,1840,1842,1843,1844,1848,1849,1850,1855,1856,1857,1858,1861,1862,1863,1864,1866,1869,1872,1877,1879,1882,1885,1886,1890,1891,1892,1896,1901,1903,1906,1908,1910,1912,1913,1915,1916,1917,1921,1926,1930,1931,1934,1937,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1951,1955,1961,1962,1963,1964,1965,1967,1976,1978,1981,1984,1987,1988,1989,1991,1992,1994,1997,1998,1999,2000,2002,2003,2004,2005,2007,2009,2011,2012,2013,2014,2016,2018,2020,2021,2022,2025,2026,2027,2028,2029,2037,2038,2042,2044,2046,2049,2053,2055,2059,2062,2065,2072,2073,2075,2076,2080,2081,2083,2084,2087,2095,2096,2097,2098,2099,2105,2108,2110,2111,2112,2113,2115,2119,2120,2121,2123,2125,2127,2128,2129,2131,2132,2134,2138,2139,2140,2141,2142,2144,2145,2147,2148,2149,2150,2151,2153,2164,2170,2173,2177,2178,2179,2181,2182,2186,2187,2188,2189,2198,2204,2206,2210,2212,2213,2214,2218,2224,2231,2232,2233,2234,2235,2238,2239,2242,2243,2254,2260,2261,2263,2267,2268,2269,2270,"
 //..............................................................   
    if ( GLV_ShowPop != "" )
    {
      var n = parseInt(GLV_ShowPop);
      if ( isNaN(GLV_ShowPop) || n < 0 || n > 6 ) n = 2;
    
      GLPU_PopRMediaURL = "www.tapuz.co.il/blog";
      if ( GLV_PopPage != "" ) GLPU_PopRMediaURL = GLV_PopPage; 
      fPU_CallPopUpByBnrType(n);      
      return;
    }   
 //..............................................................	 
    if ( fGL_SrchStrInArray( hideBanArr, GLV_FullPath ) >= 0 ) return;
 //..............................................................
    if ( fGL_ReadCookie( "Tapuz_Forums", "EditorForumId" ) != "" ) return;
 //..............................................................   		   	   
    var i = fGL_SrchStrInArray( showBanArr, GLV_FullPath );
    if ( i < 0 ) return;
 //..............................................................
    if ( GLV_FullPath.indexOf('forums2008/forumpage.aspx') != -1 ||
         GLV_FullPath.indexOf('forums2008/viewmsg.aspx')   != -1  )
	{ 
	  if ( GLV_ForumId == "" || !fGL_IsStrInList( GLV_ForumId, showInForums ) ) return;
	  try { if ( IsAdmin || specialUser(currentUserId) == "manager" ) return; } catch(e){ return; }   // IsAdmin, currentUserId - GLOBAL FORUMS VARIABLES 
	                                                                                                  // specialUser - FUNCTION FROM FILE "Forums2008/JS/msg.js"    
	}  
 //..............................................................   		   	      
    GLPU_PopRMediaURL = RMPageArr[i];
 //..............................................................   		   	          
    var ar = showTypeArr[i];
    for(var j=0; j < ar.length; j++)
      if ( fPU_CallPopUpByBnrType(ar[j]) != 0 ) break;
 //..............................................................
}
//=======================================================================
// fPU_CallPopUpByBnrType - function calls banner by Banner Type
//-----------------------------------------------------------------------
// pBnrType: 
//  0 - PopUnder when page is clicked  
//  1 - Madbeka ( Home  Pages ) 
//  2 - Show all
//  3 - Madbeka ( Inner Pages ) 
//  4 - PopUnder automatic 
//  5 - Tsaf
//-----------------------------------------------------------------------
// arShowOrder parameters:
//  m  - Madbeka 
//  p  - PopUnder 
//  pc - PopUnder when page is clicked
//  t  - Tsaf 
//-----------------------------------------------------------------------
//  cookiePath: "/" - By Domain,  "" - By Current Folder
//=======================================================================
function fPU_CallPopUpByBnrType( pBnrType )
{
    if ( pBnrType == 2 && GLV_ShowPop           == "" ) return 0;
    if ( pBnrType == 0 && GLV_HidePopUnderClick == 1  ) return 0;
    if ( pBnrType == 1 && GLV_HideMadbeka       == 1  ) return 0;
    if ( pBnrType == 3 && GLV_HideMadbeka       == 1  ) return 0;
    if ( pBnrType == 4 && GLV_HidePopUnderAuto  == 1  ) return 0;
    if ( pBnrType == 5 && GLV_HideTsaf          == 1  ) return 0;              

    if (pBnrType == 0)  // New PopUnder - when page is clicked
    {
      var arShowOrder  = new Array( "pc_1" );  
      var daysToExpire = 1/2;
      var cookieName   = "TapuzAdv_PopUnderNew";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = "/"; 
    }
    else if (pBnrType == 1)  // Madbeka ( Home  Pages )
    {
      var arShowOrder  = new Array( "m_1" );  
      var daysToExpire = 1/2;
      var cookieName   = "TapuzAdv_PopUnderMadb";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = "";
    }
    else if (pBnrType == 2)  // Test - show allways
    {
      var arShowOrder  = new Array( "p_1", "pc_1", "m_1", "t_1" );  
      var daysToExpire = 1/2;
      var cookieName   = "TapuzAdv_PopUnderTest";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = ""; 
    }
    else if (pBnrType == 3)  // Madbeka ( Inner  Pages )
    {
      var arShowOrder  = new Array( "m_1" );  
      var daysToExpire = 1;
      var cookieName   = "TapuzAdv_PopUnderInner";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = "";
    }
    else if (pBnrType == 4)  // Old PopUnder - automatic
    {
      var arShowOrder  = new Array( "p_1" );  
      var daysToExpire = 1;
      var cookieName   = "TapuzAdv_PopUnderOld";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = "";
    }
    else if (pBnrType == 5)  // Tsaf
    {
      var arShowOrder  = new Array( "t_1" );  
      var daysToExpire = 1;
      var cookieName   = "TapuzAdv_PopUnderTsaf";
      var cookieDomain = "tapuz.co.il";
      var cookiePath   = "/";
    }
    else return 0;
//.......................................        
    if (GLV_ShowPop != "") cookieName = "TapuzAdv_PopUnderTest";
//.......................................                
    var currCookie  = fGL_ReadCookie( cookieName, "" );

    for(var i=0; i < arShowOrder.length; i++)
	   { if ( currCookie == arShowOrder[i] ) break; }

	if ( i >= arShowOrder.length || ( i == arShowOrder.length-1 && GLV_ShowPop != "" ) ) i = -1;
		  
	if ( i >= arShowOrder.length-1 ) return 0;
	  
    var newCookie = arShowOrder[i+1];
    var popType = newCookie.split("_")[0];

    if (popType != "p" && popType != "pc" && popType != "m" && popType != "t") return 0;
	    
	fGL_SetCookie( cookieName, newCookie, daysToExpire, cookieDomain, cookiePath);   	    
    GLPU_PopUnderShow = "yes";
    
	if (popType == "pc")
	   fGL_DisplayAdsByLinkType( GLPU_PopRMediaURL, 'x08', 2);
    else if (popType == "p")
	   fGL_DisplayAdsByLinkType( GLPU_PopRMediaURL, 'x25', 2);			
    else if (popType == "t") 
	   fPU_OpenTsaf();
	else
	   fPU_OpenPopup();   
	return 1;   
}
//=======================================================================
// Function fPU_Start
//-----------------------------------------------------------------------
// Function is called from RM - position x08
//=======================================================================
function fPU_Start(pLink) 
{
   document.body.onclick = function(){ fPU_StartAuto(pLink); }
}  
//=======================================================================
// Function fPU_StartAuto
//-----------------------------------------------------------------------
// Function is called from RM - position x25
//=======================================================================
function fPU_StartAuto(pLink) 
{
  if (GLPU_PopUnderShow == "yes")
  {
    GLPU_PopUnderShow = "";

    var endtime = new Date().getTime() + 1000;   // sleep
    while (new Date().getTime() < endtime);

    var wparam = "width=750, height=550, left=10, top=10, resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, copyhistory=no";
    var pu = window.open( pLink, "", wparam );
    if (pu) pu.blur();
    window.focus();
  }
}
//=========================================================
// fPU_OpenPopup - function opens the Madbeka
//=========================================================
function fPU_OpenPopup()
{
 //...........................................
    var vRMPage = GLPU_PopRMediaURL;
	var vRMPos  = 'x09';
	var vPopW   =  240;
	var vPopH   =  436;
 //...........................................	
	vFrmSRC = "/general/popUnderScriptFrame.asp?page=" + vRMPage + "&pos=" + vRMPos;
 //...........................................    
    document.write (
     '<div id="popDiv" style="width:' + vPopW + 'px; height:' + vPopH + 'px;' +
     ' position:absolute; left:500px; top:450px; z-index:100;">' +
     '<iframe width=' + vPopW + ' height=' + vPopH + 
     ' noresize id=PopUpBanner scrolling=no ' +
     ' frameborder=0 marginheight=0 marginwidth=0 ' +
	 ' src="' + vFrmSRC + '">' +
     '</iframe>' + 
     '</div>' );
}
//=========================================================
// fPU_ClosePopup - Function closes the Madbeka
//=========================================================
function fPU_ClosePopup()
{
	var ob = document.getElementById("popDiv");
	if (ob) ob.style.display = 'none';
}
//=========================================================
// fPU_OpenTsaf - function opens the Tsaf Banner
//=========================================================
function fPU_OpenTsaf()
{
 //...........................................
    var vRMPage = GLPU_PopRMediaURL;
    var vRMPos  = "x67"                    
    var vWinW   = fGL_GetPageSize()[2];
 //...........................................	
	vFrmSRC = "/general/popUnderScriptFrame3.asp?page=" + vRMPage + "&pos=" + vRMPos;	
 //...........................................    
    document.write (
     '<div id="TsafDiv" style="width:' + vWinW + 'px; height:1px; padding-top:2px;' +
     ' position:fixed; left:0px; bottom:0px; z-index:100000; display:none; text-align:center; ' +
     ' background:#000000; opacity:1.0; -moz-opacity:1.0; -khtml-opacity:1.0; filter:alpha(opacity=100);">' +
     '<iframe src="' + vFrmSRC + '" width=100% height=100% noresize scrolling=no ' +
     ' frameborder=0 marginheight=0 marginwidth=0 >' +
     '</iframe>' + 
     '</div>' );
}
//=========================================================
// fPU_CloseTsaf - Function closes the Tsaf Banner
//=========================================================
function fPU_CloseTsaf()
{
	var ob = document.getElementById("TsafDiv");
	if (ob) ob.style.display = 'none';
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                              FOOTER BANNER                             @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
// Function fFtrBnr_OpenFooterBnr() 
//----------------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//============================================================================
function fFtrBnr_OpenFooterBnr()
{
    //if ( GLV_HideFooterBanner == 1 ) return;
 //.............................................................. 
    var showBanArr = new Array( "[%].tapuz.co.il/minisites/radiojerusalem[%]",
                                "[%]/sc.tapuz.co.il[%]",
                                "[%]/scdev.tapuz.co.il[%]",
                                "[%]/sf.tapuz.co.il[%]",
                                "[%]/sfdev.tapuz.co.il[%]",
                                "[%].tapuz.co.il/forums/default.asp",   
                                "[%].tapuz.co.il/forums",   
                                "[%].tapuz.co.il/forums/",
                                "[%].tapuz.co.il/tapuzforum/default.asp",
                                "[%].tapuz.co.il/tapuzforum",
                                "[%].tapuz.co.il/tapuzforum/",                                                                
 	                            "[%].tapuz.co.il/communa/default.asp",
	  	                        "[%].tapuz.co.il/communa",
	  	                        "[%].tapuz.co.il/communa/",	  	                          
 	                            "[%].tapuz.co.il/blog/default.asp",
	  	                        "[%].tapuz.co.il/blog",
	  	                        "[%].tapuz.co.il/blog/",	  	                          
 	                            "[%].tapuz.co.il/chat/default.asp",
	  	                        "[%].tapuz.co.il/chat",
	  	                        "[%].tapuz.co.il/chat/",	  	                          
                                "[%].tapuz.co.il/[%]"
		  	                  );
 //.............................................................. 
    var arBnrType  = new Array( 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
 //..............................................................		  	                  
    var hideBanArr = new Array( "[%].tapuz.co.il/communa/communamaavaron.asp", 
                                "[%].tapuz.co.il/blog/maavaron.asp",    
                                "[%].tapuz.co.il/blog/net/maavaron.aspx",                                    
                                "[%].tapuz.co.il/forums2008/forummaavaron.aspx",
                                "[%].flix.co.il[%]",    
                                "[%]flixdev.tapuz.co.il[%]",    
                                "[%]flix.tapuz.co.il[%]"                                    
 		  	                  );
 //..............................................................		  	                  		  	                  
    var arBnrW1   = new Array(   728,   468,   468,     234,     728  );
    var arBnrW2   = new Array(    -1,   234,   234,     234,      -1  );
    var arBnrW3   = new Array(    -1,    -1,    -1,     234,      -1  );       
    var arBnrH    = new Array(    90,    60,    60,      60,      90  );
    var arBnrPos1 = new Array( "x78", "x48", "x16", "TopRight", "x13" );    
    var arBnrPos2 = new Array(    "", "x49", "x18", "Middle2",    ""  );    
    var arBnrPos3 = new Array(    "",    "",    "", "TopLeft",    ""  );     
 //..............................................................		  	                  		  	                  
    if ( fGL_SrchStrInArray( hideBanArr, GLV_FullPath ) >= 0 ) return;
 //..............................................................		  	                  		  	                  
    var i = fGL_SrchStrInArray( showBanArr, GLV_FullPath );
    if ( i < 0 ) return;
 //..............................................................		  	                  		  	                  
    var j = 1;
    if ( i < arBnrType.length ) j = arBnrType[i];
 //..............................................................		  	                  		  	                     
    if ( j < 0 || j > arBnrH.length ) j = 1;
 //..............................................................		  	                  		  	                     
    if ( GLV_IsTapuzHP == 1 ) j = 4;    
 //..............................................................		  	                  		  	                     
    var vBnrW1   = arBnrW1  [j];
    var vBnrW2   = arBnrW2  [j];
    var vBnrW3   = arBnrW3  [j];        
    var vBnrH    = arBnrH   [j]; 
    var vBnrPos1 = arBnrPos1[j]; 
    var vBnrPos2 = arBnrPos2[j]; 
    var vBnrPos3 = arBnrPos3[j];         
    var vBnrPage = realMediaBannerUrl;
 //..............................................................		  	                  		  	                     
    document.write('<div style="height:10px; clear:both; overflow:hidden;"></div>');
    document.write('<div id="ftrBnrDiv" style="width:100%; height:' + vBnrH + 'px; text-align:center;">');
    document.write('<div style="margin:0 auto;" dir="rtl">');      
    DisplayAds( vBnrPage, vBnrPos1, vBnrW1, vBnrH );
    if ( vBnrPos2 != "" && vBnrW2 > 0 )
    {
	  document.write("&nbsp;&nbsp;&nbsp;");	      
      DisplayAds( vBnrPage, vBnrPos2, vBnrW2, vBnrH );    
    }
    if ( vBnrPos3 != "" && vBnrW3 > 0 )
    {
	  document.write('&nbsp;&nbsp;&nbsp;');	      
      DisplayAds( vBnrPage, vBnrPos3, vBnrW3, vBnrH );    
    }
    document.write('</div>');	  
    document.write('</div>');
    document.write('<div style="height:1px; clear:both; overflow:hidden;"></div>');    
 //..............................................................		  	                  		  	                  
} 
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                              FLIX BANNERS                              @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
function fFlixBnr_DisplayStripBnr()
{
  var vFLIX_ChannelId = -1;
  var vFLIX_UserId    = -1;
 
  try{ if ( !isNaN(GLV_FLIX_ChannelId) ) vFLIX_ChannelId = parseInt(GLV_FLIX_ChannelId); } catch(e){}
  try{ if ( !isNaN(GLV_FLIX_UserId)    ) vFLIX_UserId    = parseInt(GLV_FLIX_UserId);    } catch(e){}  
  
  var vFLIX_HideStripChannels = ",60,175,188,233,272,284,370,";

  var vFLIX_StripRMPage = "adv1.tapuz.co.il/strip-flix";
       if ( vFLIX_ChannelId == 333 ) vFLIX_StripRMPage = "www.tapuz.co.il/flix/dominos";
  else if ( vFLIX_ChannelId == 331 ) vFLIX_StripRMPage = "www.tapuz.co.il/flix/mfhp";
  else if ( vFLIX_UserId == 3337559 || 
            vFLIX_UserId == 3343367 || 
            vFLIX_UserId == 3601058  ) vFLIX_StripRMPage = "www.tapuz.co.il/flix/fanta";  // fantaclub 
   
  if ( vFLIX_ChannelId == 139 || vFLIX_ChannelId == 147 )
       document.write( 
         '<div class="space10"></div>' +
         '<a href="http://www.tapuz.co.il/forums/apps/spCount.asp?spid=2208">' +
         '<img alt="" src="/images/adv/safe_458x25.jpg" width="624" height="25" border="0" /></a>' +
         '<div class="space10"></div>' );
  else if ( vFLIX_HideStripChannels.indexOf("," + vFLIX_ChannelId + ",") == -1 )
       document.write( 
         '<div class="space10"></div>' +
         '<iframe src="http://www.tapuz.co.il/tapuzglobals/asp/TextLink/TextLink_flix.asp?p=' + vFLIX_StripRMPage + '" ' +
         ' width="624" height="25" marginheight="0" marginwidth="0" frameborder="0" scrolling="no">' +
         '</iframe>' +
         '<div class="space10"></div>' );
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            TEXT LINKS                                  @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
var GLV_TxtLink_ServerName = "http://www.tapuz.co.il";
if ( GLV_IsDevServer == 1 ) GLV_TxtLink_ServerName = "http://dev.tapuz.co.il";
//============================================================================
var GLV_TxtLink_DivNum   = "";
var GLV_TxtLink_FrameW   = "300";
var GLV_TxtLink_FrameH   = "30";
var GLV_TxtLink_Color    = "000000";
var GLV_TxtLink_CharSet  = "w";      // "w" - windows-1255, "u" - utf-8     
var GLV_TxtLink_PageType = "hp";     // "hp"         - TAPUZ HP,  
                                     // "communashp" - COMMUNAS HP
                                     // "forumshp"   - FORUMS HP
                                     // "flixstrip"  - FLIX STRIP IMAGE - ShowVideo.asp  
                                     // "all"        - OTHER PAGES
//============================================================================
function FBLike_CreateParam()
{
 try
 {
  //------------------------------------------------  
    if ( typeof GLV_TxtLink_PageType == "undefined" || 
                GLV_TxtLink_PageType == undefined   || 
                GLV_TxtLink_PageType == null         )
       GLV_TxtLink_PageType = "hp";
  //------------------------------------------------                  
    GLV_TxtLink_PageType = GLV_TxtLink_PageType.toLowerCase();
  //------------------------------------------------  
    GLV_TxtLink_FrameW   = "300";
    GLV_TxtLink_FrameH   = "30";
    GLV_TxtLink_Color    = "000000";
    GLV_TxtLink_CharSet  = "w";
    GLV_TxtLink_DivNum   = "";      
  //------------------------------------------------  
    if ( GLV_TxtLink_PageType == "communashp" ||
         GLV_TxtLink_PageType == "forumshp"    )    
    {
      GLV_TxtLink_FrameW   = "220";
      GLV_TxtLink_FrameH   = "26";
    }
  //------------------------------------------------  
    else if ( GLV_TxtLink_PageType == "all" )
    {
      GLV_TxtLink_FrameW   = "310";
      GLV_TxtLink_FrameH   = "20";
    }
  //------------------------------------------------  
    else if ( GLV_TxtLink_PageType == "flixstrip" )
    {
      GLV_TxtLink_FrameW   = "310";
      GLV_TxtLink_FrameH   = "20";
      GLV_TxtLink_DivNum   = "2";
    }
  //------------------------------------------------  
 }  
 catch(e)
 {
   GLV_TxtLink_PageType = "hp";
   GLV_TxtLink_FrameW   = "300";
   GLV_TxtLink_FrameH   = "30";
   GLV_TxtLink_Color    = "000000";
   GLV_TxtLink_CharSet  = "w";
   GLV_TxtLink_DivNum   = "";
 } 
}
//============================================================================
function DisplayAdsMain_FBLike( pSitepage, pPosition, pPageType )
{
    GLV_TxtLink_PageType = pPageType;
    FBLike_CreateParam();

	var src = fGL_GetRMLink( pSitepage, pPosition, 1 );
	document.write( '<scr' + 'ipt src="' + src + '" type="text/javascript" charset="windows-1255"></scr' + 'ipt>' );
}
//============================================================================
function DisplayFBLikeButton()
{
 try
 {
  //------------------------------------------------          
    var objMLinkUser = document.getElementById("mLinksUser");
    var objSrchBox   = document.getElementById("divSearchBox"); 
    var objMLinks    = document.getElementById("divMLinks");
          
    if (objMLinkUser) objMLinkUser.style.display = "none";
    if (objSrchBox)   objSrchBox.style.height = GLV_TxtLink_FrameH + "px";
    if (objMLinks)    objMLinks.style.height  = GLV_TxtLink_FrameH + "px";
  //------------------------------------------------         
    var vFrameSrc = GLV_TxtLink_ServerName + "/tapuzglobals/asp/TextLink/TextLink_frame.asp" +
                    "?c="   + GLV_TxtLink_Color   +
                    "&chs=" + GLV_TxtLink_CharSet +
                    "&fh="  + GLV_TxtLink_FrameH  +
                    "&n="   + GLV_TxtLink_DivNum;  
  //------------------------------------------------         
    var fr = '<iframe src="' + vFrameSrc + '" width="' + GLV_TxtLink_FrameW + '" height="' + GLV_TxtLink_FrameH + '" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" style="background:transparent;"></iframe>';
  //------------------------------------------------           
    if ( GLV_TxtLink_PageType == "flixstrip")
       document.write('<div style="width:624px; text-align:right;">' + fr + '</div>');
    else
    {   
      var ob = document.getElementById('mLinksHeader');
      if (!ob) ob = document.getElementById('mLinksTop');
      if (ob) ob.innerHTML = fr;
    }  
   //------------------------------------------------         
 }
 catch(e){}
}
//============================================================================
function DisplayTextLink( pMLinkRMPage )
{
 try
 {
  var objMLinkUser = document.getElementById("mLinksUser");
  var objSrchBox   = document.getElementById("divSearchBox");
  var objMLinks    = document.getElementById("divMLinks");

  if (objMLinkUser) objMLinkUser.style.display = "";
  if (objSrchBox)   objSrchBox.style.height = "16px";
  if (objMLinks)    objMLinks.style.height  = "16px";

  //if ( GLV_TxtLink_PageType == 'hp' )
  //   DisplayAdsMain_Mlinks( pMLinkRMPage, 'x22' );
  //else
       DisplayAdsMainSXCGI( pMLinkRMPage, "x22" );
 }
 catch(e){}
}
//============================================================================
function DisplayFlixStrip( pMLinkRMPage )
{
 try { DisplayAds( pMLinkRMPage, "Top3", '624', '25' ); } catch(e){}
}
//============================================================================
function fTxtLink_Show()
{
    if ( GLV_HideTextLink == 1 ) return;

    var objMlink = document.getElementById("AsyncMlinkBanner");
    if (objMlink)
    { 
      if (objMlink.attributes["AsyncSRC"] && objMlink.src)               // Old Sites: Food, Bike, Flix... 
      { 
        if ( objMlink.src != objMlink.attributes["AsyncSRC"].value ) 
             objMlink.src = objMlink.attributes["AsyncSRC"].value;
      }  
      else if (fGL_isEmpty(objMlink.innerHTML))                          // DOT NET 
      { 
        var vMlinkFile  = "http://www.tapuz.co.il/common/MlinksIframe.aspx";
        var vMlinkStyle = "font-size:12px;color:black;font-weight:bold;font-family:arial;";

        objMlink.innerHTML = 
          "<iframe width='95%' height='16' frameborder='0' scrolling='no' " +
          " allowTransparency='true' id='AsyncMlinkBanner' " +
          " src='" + vMlinkFile + "?mlinkStyle=" + escape(vMlinkStyle) + "'>" +
          "</iframe>"; 
      }
    }
}
//============================================================================
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@                            CORNERS                                     @@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//============================================================================
// Function fCorner_GetShowBannerFlag 
//-----------------------------------------------------------------------
//  [%] - means any number of characters
//  [%]PART_TEXT[%] - Link contains    PART_TEXT
//     PART_TEXT[%] - Link begins with PART_TEXT
//  [%]PART_TEXT    - Link end in      PART_TEXT
//     PART_TEXT    - Link equals      PART_TEXT
//-----------------------------------------------------------------------
//  Function returns Show Banner Flag:
//    0 - do not show banner, 
//    1 - show  left  banner, 
//    2 - show  right banner )
//=======================================================================
function fCorner_GetShowBannerFlag()
{
 //.............................................................. 
    var showBanArr = new Array( "[%].tapuz.co.il/hp1.asp",              
                                "[%].tapuz.co.il",                                                
                                "[%].tapuz.co.il/",                                                                                  
                                "[%].tapuz.co.il/communa/default.asp", 
                                "[%].tapuz.co.il/communa",                                   
                                "[%].tapuz.co.il/communa/",                                                                     
                                "[%].tapuz.co.il/blog/default.asp",    
                                "[%].tapuz.co.il/blog",    
                                "[%].tapuz.co.il/blog/",                                                                        
 	                            "[%].tapuz.co.il/chat/default.asp",
	  	                        "[%].tapuz.co.il/chat",
	  	                        "[%].tapuz.co.il/chat/",	  	                          
                                "[%].tapuz.co.il/forums/default.asp",   
                                "[%].tapuz.co.il/forums",   
                                "[%].tapuz.co.il/forums/",                                     
                                "[%].tapuz.co.il/tapuzforum/default.asp",                                     
                                "[%].tapuz.co.il/tapuzforum",                                     
                                "[%].tapuz.co.il/tapuzforum/", 		   	           
                                "[%].flix.tapuz.co.il/default.asp",                                     
                                "[%]flix.tapuz.co.il",                                     
                                "[%]flix.tapuz.co.il/",                                     
                                "[%]flix.tapuz.co.il/v/watch-[%]", 		   	           
                                "[%]flixdev.tapuz.co.il/default.asp",                                     
                                "[%]flixdev.tapuz.co.il",                                     
                                "[%]flixdev.tapuz.co.il/",                                     
                                "[%]flixdev.tapuz.co.il/v/watch-[%]"                                 		   	           
		  	                  );
 //..............................................................   
    var showType = new Array( 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2 );
 //..............................................................
    if ( fGL_GetPageSize()[2] < 950 ) return 0;  
    if ( RM_IPHONE_IPAD_STR != ""   ) return 0;
    if ( GLV_TestCorner     == "1"  ) return 1;
    if ( GLV_TestCorner     == "2"  ) return 2;   
    if ( GLV_TestCorner     == "3"  ) return 3;
    if ( GLV_TestCorner     == "4"  ) return 4;   
 //..............................................................
    var i = fGL_SrchStrInArray( showBanArr, GLV_FullPath );
 //..............................................................         
    if ( i < 0) return 0;
 //..............................................................                
    if ( showType[i] == 1 || showType[i] == 2 ) return showType[i];
 //..............................................................                   
    return 0;
}
//=================================================================================
function fCorner_showBanner()
{
 //..............................................................                   
    var i = fCorner_GetShowBannerFlag();
 //..............................................................                   
	if ( i == 0 ) return;
 //..............................................................                   
    if ( i == 1 || i == 3 )
	   document.write ( '<div id="CornerLeftDiv"  style="position:fixed; top:0px; left:0px;  z-index:250000;"></div>\n' );
    else
       document.write ( '<div id="CornerRightDiv" style="position:fixed; top:0px; right:0px; z-index:250000;"></div>\n' );	   
 //..............................................................                   
    if ( i > 2 )  
    {
      var src = "http://dev.tapuz.co.il/test_ilya/corner/TEST_CORNER_BANNER.js";			
      document.write ('\<scr' + 'ipt type="text/javascript" src="' + src + '"\>\<\/scr' + 'ipt\>');
    }
    else
      fGL_DisplayAdsByLinkType( realMediaBannerUrl, "x24", 1);
      
    if (GLV_BlockCorner != 0) fGL_OpenCloseCorner(1);  
}
//============================================================================





