/* GLOBAL FILE ================================*/
/* THIS CODE PROPAGATES THE Click VARIABLE FROM THE ENTRY PAGE */
/* DEPENDS ON ANALYTICS MODULE */
var affRefPattern=/analytics_entryPage=[^;]+Click%3D([0-9]+)/;
var affClickId=document.cookie.match(affRefPattern) && document.cookie.match(affRefPattern)[1];
if (document.cookie.match(/analytics_originalReferer=[^;]+\.radioreference\.com/)) { // hardcoded affid for radioreference.com
    affClickId=20907;
} else if (document.cookie.match(/analytics_originalReferer=[^;]+\.butel\.nl/)) { // hardcoded affid for radioreference.com
    affClickId=41054;
}


if (affClickId) { 
  function affRewrite() {
    for(var c=0; c < document.links.length; c++) {
      if (document.links[c].hostname=="www.scannermaster.com") {
          document.links[c].href+=(document.links[c].search ? '&' : '?') + 'Click=' + affClickId;
      }
    } 
  }
  if (window.attachEvent) {
    window.attachEvent("onload", affRewrite);
  } else if (document.addEventListener) {
    window.addEventListener("load", affRewrite, true);
  }
}
/* Click VAR SUPPORT END */

	 function findTable(table) { // For faster usage
	   while((table.localName || table.tagName).toLowerCase() != 'table') {
              table=table.parentNode;
           }
	   return table;
	 }
	 
	 function setClassHoverTable(node) {
			 if (!node.table) node.table=findTable(node);
			 var cellIndex=node.cellIndex;

			 setClassHover(node, 'hoverCell');
			 setClassHover(node.parentNode, 'hoverRow');			 
			 for(var row=0; row < node.table.rows.length; row++) {
					 setClassHover(node.table.rows[row].cells[cellIndex], 'hoverCol');
			 }
	 }

	 function unsetClassHoverTable(node) {
			 if (!node.table) node.table=findTable(node);
			 var cellIndex=node.cellIndex;

			 unsetClassHover(node, 'hoverCell');
			 unsetClassHover(node.parentNode, 'hoverRow');
			 for(var row=0; row < node.table.rows.length; row++) {
					 unsetClassHover(node.table.rows[row].cells[cellIndex], 'hoverCol');
			 }
	 }


 	 function setClassHover(node, sClass) {
           if (!node) return;
	   node.className=(node.className || node.getAttribute('class')) + ' '+sClass;
	   node.setAttribute('class', node.className);
	 }

	 function unsetClassHover(node, sClass) {
           if (!node) return;
	   node.className=(node.className || node.getAttribute('class')).replace(new RegExp(" "+sClass), '');
	   node.setAttribute('class', node.className);	 
	 }


function LoadFlash(elementId, url, w, h, bgcolor, wmode) {
	var e = document.getElementById(elementId);
	e.innerHTML = 
	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" align="middle">'+
	'<param name="allowScriptAccess" value="sameDomain" />'+
	'<param name="movie" value="'+url+'" />'+
	'<param name="quality" value="high" />'+
	'<param name="bgcolor" value="'+bgcolor+'" />'+
	'<param name="wmode" value="'+wmode+'" />'+
	'<embed src="'+url+'" quality="high" bgcolor="'+bgcolor+'" width="'+w+'" height="'+h+'" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
	'</object>';
}



/* LOCAL FILE ================================ */
		function toCenter(el) {                                                                                                  	
			
			var bl = $("blackOut");
			
			el.style.display = 'block';
			bl.style.display = 'block';

			el.style.position = "absolute";
			
                        if (window.innerWidth) {
				var screenMaxW = window.innerWidth;
				var screenMaxH = window.innerHeight;
			} else if (document.documentElement && document.documentElement.clientWidth) {
				var screenMaxH = document.documentElement.clientHeight;
				var screenMaxW = document.documentElement.clientWidth;
			} else if (document.body) {
				var screenMaxW = document.body.clientWidth;
				var screenMaxH = document.body.clientHeight;
			}
			var x = (screenMaxW - el.clientWidth)/2;
        		var y = (screenMaxH - el.clientHeight)/2;


			if (document.all) {	
				iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
                   		y = y + iebody.scrollTop;
				bl.style.height = iebody.scrollWidth;

			} else {
				// el.style.position = "fixed";
				bl.style.position = "fixed";
			}

	                el.style.left = x + 'px';
			_a.effect(el).show();
			el.style.top = "-600px"; /*y + 'px';*/
			
			if (_a.browser.msie) {
				
				/*$(bl).fadeIn("slow");
				$(el).animate({"top":y}, "slow", "swing");*/
			} else {
				/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			}
			/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			_a.effect(el).animate({"top":y}, "slow", "swing");
		}

		function hideLogin() {
			
			_a.effect("helpNotes").animate({"top":-600},"slow", "swing", function() {
				_a.effect("blackOut").hide();
	
				if (_a.browser.msie) {
					
				} else {
					/*$("#blackOut").fadeOut("slow");*/

				}
			});

		}

		function hideLogin2() {
			
			_a.effect("helpNotes2").animate({"top":-600},"slow", "swing", function() {
				_a.effect("blackOut").hide();
	
				if (_a.browser.msie) {
					
				} else {
					/*$("#blackOut").fadeOut("slow");*/

				}
			});

		}





		function sendWindow () {                                                                                                  	
			
			var bl = document.getElementById("blackOut");
			var el = document.getElementById("sendThisPage");
			
			el.style.display = 'block';
			bl.style.display = 'block';

			el.style.position = "absolute";
			
                        if (window.innerWidth) {
				var screenMaxW = window.innerWidth;
				var screenMaxH = window.innerHeight;
			} else if (document.documentElement && document.documentElement.clientWidth) {
				var screenMaxH = document.documentElement.clientHeight;
				var screenMaxW = document.documentElement.clientWidth;
			} else if (document.body) {
				var screenMaxW = document.body.clientWidth;
				var screenMaxH = document.body.clientHeight;
			}
			var x = (screenMaxW - el.clientWidth)/2;
        		var y = (screenMaxH - el.clientHeight)/2;


			if (document.all) {	
				iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
                   		y = y + iebody.scrollTop;
				bl.style.height = iebody.scrollWidth;

			} else {
				// el.style.position = "fixed";
				bl.style.position = "fixed";
			}

	                el.style.left = x + 'px';
			$(el).show();
			el.style.top = "-600px"; /*y + 'px';*/
			$("#gallerycontainer").hide();
			if ($.browser.msie) {
				
				/*$(bl).fadeIn("slow");
				$(el).animate({"top":y}, "slow", "swing");*/
			} else {
				/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			}
			/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			$(el).animate({"top":y}, "slow", "swing");
		}

		function hideSend() {
			
			$("#sendThisPage").animate({"top":"-600"},"slow", "swing", function() {
				$("#blackOut").hide();
				$("#gallerycontainer").show();
	
				if ($.browser.msie) {
					
				} else {
					/*$("#blackOut").fadeOut("slow");*/

				}
			});

		}





function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}




		function toCenterD(el) {                                                                                                  	
			
			var bl = $("blackOut");
			
			el.style.display = 'block';
			bl.style.display = 'block';

			el.style.position = "absolute";
			
                        if (window.innerWidth) {
				var screenMaxW = window.innerWidth;
				var screenMaxH = window.innerHeight;
			} else if (document.documentElement && document.documentElement.clientWidth) {
				var screenMaxH = document.documentElement.clientHeight;
				var screenMaxW = document.documentElement.clientWidth;
			} else if (document.body) {
				var screenMaxW = document.body.clientWidth;
				var screenMaxH = document.body.clientHeight;
			}
			var x = (screenMaxW - el.clientWidth)/2;
        		var y = (screenMaxH - el.clientHeight)/2;


			if (document.all) {	
				iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
                   		y = y + iebody.scrollTop;
				bl.style.height = iebody.scrollWidth;

			} else {
				// el.style.position = "fixed";
				bl.style.position = "fixed";
			}

	                el.style.left = x + 'px';
			_a.effect(el).show();
			el.style.top = "-600px"; /*y + 'px';*/
			
			if (_a.browser.msie) {
				
				/*$(bl).fadeIn("slow");
				$(el).animate({"top":y}, "slow", "swing");*/
			} else {
				/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			}
			/*$(bl).fadeIn("slow", function() {$(el).animate({"top":y}, "slow", "swing")});*/
			_a.effect(el).animate({"top":y}, "slow", "swing");
		}


