[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_module/mod_ads/template/js/ -> ads.js (source)

   1  function showImageAds() {
   2      obj = getObjectById('adcampaign_image');
   3      val = obj.options[obj.selectedIndex].value;
   4      if(val && val != '') {
   5          var boxw = getFieldById('adcampaign_width').value;
   6          var boxh = getFieldById('adcampaign_height').value;
   7          var set  = true;
   8          if(boxh+boxw==0) {
   9              boxh = 350;
  10              box2 = 770;
  11              set  = false;
  12          }
  13          
  14          wh = parseInt(boxh)+50;
  15          ww = parseInt(boxw)+30;
  16          
  17          newwindow2=window.open('','name','width='+ww+',height='+wh+',scrollbars=yes,resizable=yes');
  18          var tmp = newwindow2.document;
  19          tmp.write('<html><head><title>banner image</title>');
  20          tmp.write('<style type="text/css">\n');
  21          tmp.write('body{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#000000;background-color:#FFFFFF;}\n');
  22          tmp.write('a{color:#000000;}');
  23          tmp.write('\n</style></head><body>');
  24          tmp.write('<p align="center"><img src="'+adsPath+val+'" border="0" ');
  25          if(set) {
  26              tmp.write('width="'+boxw+'" height="'+boxh+'" ');
  27          }
  28          tmp.write('alt="" /></p>');
  29          tmp.write('<p align="center"><a href="javascript:self.close()">close</a> the popup.</p>');
  30          tmp.write('</body></html>');
  31          tmp.close();
  32          
  33      }
  34  }
  35  
  36  function showHtmlAds() {
  37      val = getFieldById('adcampaign_html').value;
  38      if(val && val != '') {
  39          
  40          var boxw = getFieldById('adcampaign_width').value;
  41          var boxh = getFieldById('adcampaign_height').value;
  42          var set  = true;
  43          if(boxh+boxw==0) {
  44              boxh = 350;
  45              box2 = 770;
  46              set  = false;
  47          }
  48  
  49          wh = parseInt(boxh)+50;
  50          ww = parseInt(boxw)+30;
  51          
  52          newwindow2=window.open('','name','width='+ww+',height='+wh+',scrollbars=yes,resizable=yes');
  53          var tmp = newwindow2.document;
  54          tmp.write('<html><head><title>banner image</title>');
  55          tmp.write('<style type="text/css">\n');
  56          tmp.write('body{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#000000;background-color:#FFFFFF;}\n');
  57          tmp.write('a{color:#000000;}\n');
  58          if(set) {
  59              tmp.write('#box{width:'+boxw+'px;height:'+boxh+'px;border:1px solid #000000;margin:0 auto 0 auto;padding:0;overflow:hidden;}');
  60          } else {
  61              tmp.write('#box{display:compact;border:1px solid #000000;margin:0 auto 0 auto;padding:5px;overflow:hidden;}');
  62          }
  63          tmp.write('\n</style></head><body>');
  64          tmp.write('<div id="box">'+val+'</div>');
  65          tmp.write('<p align="center"><a href="javascript:self.close()">close</a> the popup.</p>');
  66          tmp.write('</body></html>');
  67          tmp.close();
  68          
  69      }
  70  }
  71  
  72  function showFlashAds() {
  73      obj = getObjectById('adcampaign_flash');
  74      val = obj.options[obj.selectedIndex].value;
  75      if(val && val != '') {
  76          
  77          var boxw = getFieldById('adcampaign_width').value;
  78          var boxh = getFieldById('adcampaign_height').value;
  79          var set  = true;
  80          if(boxh+boxw==0) {
  81              boxh = 350;
  82              box2 = 770;
  83              set  = false;
  84          }
  85  
  86          wh = parseInt(boxh)+50;
  87          ww = parseInt(boxw)+30;
  88          
  89          newwindow2=window.open('','name','width='+ww+',height='+wh+',scrollbars=yes,resizable=yes');
  90          var tmp = newwindow2.document;
  91          tmp.write('<html><head><title>banner image</title>');
  92          tmp.write('<style type="text/css">\n');
  93          tmp.write('body{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#000000;background-color:#FFFFFF;}\n');
  94          tmp.write('a{color:#000000;}\n');
  95          if(set) {
  96              tmp.write('#box{width:'+boxw+'px;height:'+boxh+'px;border:1px solid #000000;margin:0 auto 0 auto;padding:0;overflow:hidden;}');
  97          } else {
  98              tmp.write('#box{display:compact;border:1px solid #000000;margin:0 auto 0 auto;padding:5px;overflow:hidden;}');
  99          }
 100          tmp.write('\n</style></head><body>');
 101          tmp.write('<div id="box">');
 102          
 103          tmp.write('<object width="'+boxw+'" height="'+boxh+'"><param name="movie" value="'+adsPath+val+'"></param><param name="wmode" value="transparent"></param><embed src="'+adsPath+val+'" type="application/x-shockwave-flash" wmode="transparent" width="'+boxw+'" height="'+boxh+'"></embed></object>');
 104          
 105          tmp.write('</div>');
 106          tmp.write('<p align="center"><a href="javascript:self.close()">close</a> the popup.</p>');
 107          tmp.write('</body></html>');
 108          tmp.close();
 109          
 110      }
 111  }


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7