/* Div Placement At Right Edge Of Window
   Version 1.0
   October 18, 2009
   http://www.willmaster.com/
   Copyright 2009 Bontrager Connection, LLC
*/

 /***************************/
/* Three places to customize */


// Place 1:
// Specify the width of the div and its border width.

var DivWidth = 32;
var BorderWidth = 0; // 0 (zero) if no border

// Place 2:
// Specify the id value of the div to place.

var DivID = "feedicon";


// Place 3:
// Specify how much space (number of pixels) between div and right window edge.

var SpaceAtEdge = 10;


 /* No other customizations required. */
/*************************************/
DivWidth = parseInt(DivWidth) + parseInt(SpaceAtEdge) + (parseInt(BorderWidth)*2);

function AppendOnloadResizeEvents(f)
{
   var cache = window.onload;
   if(typeof window.onload != 'function') { window.onload = f; }
   else
   {
      window.onload = function()
      {
         if(cache) { cache(); }
         f();
      };
   }
   cache = window.onresize;
   if(typeof window.onresize != 'function') { window.onresize = f; }
   else
   {
      window.onresize = function()
      {
         if(cache) { cache(); }
         f();
      };
   }
} // function AppendOnloadResizeEvents()

function WindowHasScrollbar() {
var ht = 0;
if(document.all) {
   if(document.documentElement) { ht = document.documentElement.clientHeight; }
   else { ht = document.body.clientHeight; }
   } 
else { ht = window.innerHeight; }
if (document.body.offsetHeight > ht) { return true; }
else { return false; }
} // WindowHasScrollbar()

function NailItIntoPlace(ledge) {
var did = document.getElementById(DivID);
did.style.left = ledge + "px";
did.style.display = "block";
} // function NailItIntoPlace()

function PlaceTheContent() {
if(document.documentElement && document.documentElement.clientWidth) { NailItIntoPlace(document.documentElement.clientWidth-DivWidth); }
else {
   if(navigator.userAgent.indexOf('MSIE') > 0) { NailItIntoPlace(document.body.clientWidth-DivWidth+19); }
   else {
      var scroll = WindowHasScrollbar() ? 0 : 15;
      if(typeof window.innerWidth == 'number') { NailItIntoPlace(window.innerWidth-DivWidth-15+scroll); }
      else { NailItIntoPlace(document.body.clientWidth-DivWidth+15); }
      }
   }
} // function PlaceTheContent()

AppendOnloadResizeEvents(PlaceTheContent);
/********************************************************************************************************/

/* Div Placement At Right Edge Of Window
   Version 1.0
   October 18, 2009
   http://www.willmaster.com/
   Copyright 2009 Bontrager Connection, LLC
*/

 /***************************/
/* Three places to customize */


// Place 1:
// Specify the width of the div and its border width.

var DivWidthL = 32;
var BorderWidthL = 0; // 0 (zero) if no border

// Place 2:
// Specify the id value of the div to place.

var DivIDL = "feediconL";


// Place 3:
// Specify how much space (number of pixels) between div and right window edge.

var SpaceAtEdgeL = 8;


 /* No other customizations required. */
/*************************************/
DivWidthL = parseInt(DivWidthL) + parseInt(SpaceAtEdgeL) + (parseInt(BorderWidthL)*2);

function AppendOnloadResizeEventsL(f)
{
   var cache = window.onload;
   if(typeof window.onload != 'function') { window.onload = f; }
   else
   {
      window.onload = function()
      {
         if(cache) { cache(); }
         f();
      };
   }
   cache = window.onresize;
   if(typeof window.onresize != 'function') { window.onresize = f; }
   else
   {
      window.onresize = function()
      {
         if(cache) { cache(); }
         f();
      };
   }
} // function AppendOnloadResizeEvents()

function WindowHasScrollbarL() {
var ht = 0;
if(document.all) {
   if(document.documentElement) { ht = document.documentElement.clientHeight; }
   else { ht = document.body.clientHeight; }
   } 
else { ht = window.innerHeight; }
if (document.body.offsetHeight > ht) { return true; }
else { return false; }
} // WindowHasScrollbar()

function NailItIntoPlaceL(ledge) {
var didL = document.getElementById(DivIDL);
didL.style.right = ledge + "px";
didL.style.display = "block";
} // function NailItIntoPlace()

function PlaceTheContentL() {
if(document.documentElement && document.documentElement.clientWidth) { NailItIntoPlaceL(document.documentElement.clientWidth-DivWidthL); }
else {
   if(navigator.userAgent.indexOf('MSIE') > 0) { NailItIntoPlaceL(document.body.clientWidth-DivWidthL+19); }
   else {
      var scroll = WindowHasScrollbar() ? 0 : 15;
      if(typeof window.innerWidth == 'number') { NailItIntoPlaceL(window.innerWidth-DivWidthL-15+scroll); }
      else { NailItIntoPlaceL(document.body.clientWidth-DivWidthL+15); }
      }
   }
} // function PlaceTheContent()

AppendOnloadResizeEventsL(PlaceTheContentL);

/**********************************************************************************************************
function PopUp()
{
        var URL =  "coupon_form.php";
        var Name = "popup";
var Fensteroptionen = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,top=30px,left=250px;";
var Breite = 550;
var Hoehe = 600;
window.open(URL, 'Name', Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
}
*/
