
/*   force divs to be equal height */

function P7_colH2(){ 
 var i,oh,h=0,tg,el,np,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.p7eqa=1;
 document.p7eqth=document.body.offsetHeight;
 document.p7eqtw=document.body.offsetWidth;}
}
function P7_eqT2(){ 
 if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){P7_colH2();}
}
function P7_equalCols2(){ 
 var c,e,el;if(document.getElementById){document.p7eqc=new Array();
 document.p7eqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="p7eq"+i;}}}if(c&&el){
 document.p7eqc[document.p7eqc.length]=c;document.p7eqc[document.p7eqc.length]=el}}
 setInterval("P7_eqT2()",10);}
}
function P7_eqA2(el,p,pt){ 
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("P7_eqA2('"+el+"',"+np+","+pt+")",sp);}
}


/*   force divs to be equal height - another section */


function product_testing_colH2(){ 
 var i,oh,h=0,tg,el,np,dA=document.product_testingeqc,an=document.product_testingeqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){product_testing_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.product_testingeqa=1;
 document.product_testingeqth=document.body.offsetHeight;
 document.product_testingeqtw=document.body.offsetWidth;}
}
function product_testing_eqT2(){ 
 if(document.product_testingeqth!=document.body.offsetHeight||document.product_testingeqtw!=document.body.offsetWidth){product_testing_colH2();}
}
function product_testing_equalCols2(){ 
 var c,e,el;if(document.getElementById){document.product_testingeqc=new Array();
 document.product_testingeqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="product_testingeq"+i;}}}if(c&&el){
 document.product_testingeqc[document.product_testingeqc.length]=c;document.product_testingeqc[document.product_testingeqc.length]=el}}
 setInterval("product_testing_eqT2()",10);}
}
function product_testing_eqA2(el,p,pt){ 
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("product_testing_eqA2('"+el+"',"+np+","+pt+")",sp);}
}

/*   force divs to be equal height - another section */


function content_colH2(){ 
 var i,oh,h=0,tg,el,np,dA=document.contenteqc,an=document.contenteqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){content_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.contenteqa=1;
 document.contenteqth=document.body.offsetHeight;
 document.contenteqtw=document.body.offsetWidth;}
}
function content_eqT2(){ 
 if(document.contenteqth!=document.body.offsetHeight||document.contenteqtw!=document.body.offsetWidth){content_colH2();}
}
function content_equalCols2(){ 
 var c,e,el;if(document.getElementById){document.contenteqc=new Array();
 document.contenteqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="contenteq"+i;}}}if(c&&el){
 document.contenteqc[document.contenteqc.length]=c;document.contenteqc[document.contenteqc.length]=el}}
 setInterval("content_eqT2()",10);}
}
function content_eqA2(el,p,pt){ 
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("content_eqA2('"+el+"',"+np+","+pt+")",sp);}
}

/*   force divs to be equal height - another section */


function product_testing2_colH2(){ 
 var i,oh,h=0,tg,el,np,dA=document.product_testing2eqc,an=document.product_testing2eqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){product_testing2_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.product_testing2eqa=1;
 document.product_testing2eqth=document.body.offsetHeight;
 document.product_testing2eqtw=document.body.offsetWidth;}
}
function product_testing2_eqT2(){ 
 if(document.product_testing2eqth!=document.body.offsetHeight||document.product_testing2eqtw!=document.body.offsetWidth){product_testing2_colH2();}
}
function product_testing2_equalCols2(){ 
 var c,e,el;if(document.getElementById){document.product_testing2eqc=new Array();
 document.product_testing2eqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="product_testing2eq"+i;}}}if(c&&el){
 document.product_testing2eqc[document.product_testing2eqc.length]=c;document.product_testing2eqc[document.product_testing2eqc.length]=el}}
 setInterval("product_testing2_eqT2()",10);}
}
function product_testing2_eqA2(el,p,pt){ 
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("product_testing2_eqA2('"+el+"',"+np+","+pt+")",sp);}
}

/* browser select script for css */

var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();

/* clear forum text script */

function clearText(thefield)
		{
			if (thefield.defaultValue == thefield.value)
			thefield.value = ""
      	else thefield.value = thefield.defaultValue
		} 
      	
/* captions for images */
/* Globals */
var arc90_navigator = navigator.userAgent.toLowerCase();
var arc90_isOpera = arc90_navigator.indexOf('opera') >= 0? true: false;
var arc90_isIE = arc90_navigator.indexOf('msie') >= 0 && !arc90_isOpera? true: false;
var arc90_isSafari = arc90_navigator.indexOf('safari') >= 0 || arc90_navigator.indexOf('khtml') >= 0? true: false;

function arc90_imgcaption() {
var O = document.getElementsByTagName('P'); // For safari???
for (var i = 0, l = O.length; i < l; i++)
	O[i].appendChild(arc90_newNode('span'));

	var O = document.getElementsByTagName('IMG');
	for (i = 0, l = O.length; i < l; i++) {
		var o = O[i];
		if (o != null && o.className && o.className.indexOf('imgcaption') >= 0) {
			try {
				var f = o.className.replace(/(.*)float(l|r)(.*)/, '$2');
				var s = arc90_newNode('div', 'arc90_imcaption'+ i, 'arc90_imgcaption'+ (f.length == 1? ' float'+ f: ' floatl'));

				var I = o.cloneNode(true);
				I.className = 'arc90_imgcaptionIMG';

				s.appendChild(I);
				
				var x = arc90_newNode('p', '', 'arc90_imgcaptionTXT');
				var y = arc90_newNode('p', '', 'arc90_imgcaptionALT');
				var z = arc90_newNode('span', '', 'arc90_imgcaptionALT');

				if (o.alt != '') {
					z.innerHTML = arc90_gtlt(o.alt);
					y.appendChild(z);
					s.appendChild(y);
				}

				if (o.title != '') {
					x.innerHTML = arc90_gtlt(o.title);
					s.appendChild(x);
				}

				o.parentNode.insertBefore(s, o);
				o.parentNode.removeChild(o);

				if (document.all || arc90_isSafari) {
					var w = parseInt(I.offsetWidth);
					if (w != '')
						s.style.width = w +'px';
				} else {
					w = arc90_getStyle(I, 'width', 'width');
					if (w != '') {
						s.style.width = (parseInt(w)) + 'px';
						x.style.width = (parseInt(w)) + 'px';
						y.style.width = (parseInt(w)) + 'px';
					}
				}
			} catch (err) { o = null; }
		}
	}
var O = document.getElementsByTagName('P'); // For safari???
for (i = 0, l = O.length; i < l; i++)
	O[i].appendChild(arc90_newNode('span'));
}

function arc90_gtlt(s) {
	s = s.replace(/&gt;/g, '>');
	s = s.replace(/&lt;/g, '<');
	return s;
}

function arc90_getStyle(obj, styleIE, styleMoz) {
	if (arc90_isString(obj)) obj = document.getElementById(obj);
	if (window.getComputedStyle)
		return document.defaultView.getComputedStyle(obj, null).getPropertyValue(styleMoz);
	else if (obj.currentStyle)
		return obj.currentStyle[styleIE];
}

function arc90_findDimension(obj, pType) {
	if (arc90_isString(obj)) obj = document.getElementById(obj);
	var cur = 0;
	if(obj.offsetParent)
		while(obj.offsetParent) {
			switch(pType.toLowerCase()) {
			case "width":
				cur += obj.offsetWidth; break;
			case "height":
				cur += obj.offsetHeight; break;
			case "top":
				cur += obj.offsetTop; break;
			case "left":
				cur += obj.offsetLeft; break;
			}
			obj = obj.offsetParent;
		}
	return cur;
}

/* Events */
function arc90_isString(o) { return (typeof(o) == "string"); }

function arc90_addEvent(e, meth, func, cap) {
	if (arc90_isString(e))	e = document.getElementById(e);

	if (e.addEventListener){
		e.addEventListener(meth, func, cap);
    	return true;
	}	else if (e.attachEvent)
		return e.attachEvent("on"+ meth, func);
	return false;
}

/* Nodes */
function arc90_newNode(t, i, s, x, c) {
	var node = document.createElement(t);
	if (x != null && x != '') {
		var n = document.createTextNode(x);
		node.appendChild(n);
	}
	if (i != null && i != '')
		node.id = i;
	if (s != null && s != '')
		node.className = s;
	if (c != null && c != '')
		node.appendChild(c);
	return node;
}

/* Onload */
arc90_addEvent(window, 'load', arc90_imgcaption);      	

