﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CUSTOM
////////////////////////////////////////////////////////////////////////////////////////////////////////////

var aiim = {};
aiim.widget = {};
aiim.util = {};
aiim.util.getElement = function(el) {
	if (el && typeof el == "string")
		return document.getElementById(el);
	return el;
};
aiim.util.getElementChildren = function(el) {
	var children = [];
	var child = el.firstChild;
	while (child)
	{
		if (child.nodeType == 1)
			children.push(child);
		child = child.nextSibling;
	}
	return children;
};
aiim.util.browser = {
    init: function () {
		this.agent = this.searchString(this.dataBrowser) || "unknown";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "unknown";
	},
	searchString: function (data) {
	    var dataLen = data.length;
		for (var i=0;i<dataLen;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{	// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 	// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	]
};
aiim.util.browser.init();
aiim.trans = {};
aiim.trans.defaultTransition = function(time,begin,finish,duration) { 
    time/=duration;
    return begin + ((2.001-time) * time * finish);
};
/*= popup
--------------------------------------------------*/
aiim.widget.popup = function(el,opt) {
    this.el = aiim.util.getElement(el);
    this.bgnY = this.curY = opt.from;
    this.dstY = opt.to;
    this.duration = opt.dur;
    this.startTime = 0;
    this.trans = aiim.trans.defaultTransition;
    this.interval = 1000/40; //fps
    this.timeoutId = 0;
    var me = this;
    this.intervalFunc = function() { me.step(); }
    this.animate = true;
    this.blocked = false;
};
aiim.widget.popup.prototype.start = function () {
    this.stop();
    this.curY = this.el.offsetTop;
    this.startTime = (new Date()).getTime();
    if(this.animate)
        this.timeoutId = setTimeout(this.intervalFunc, this.interval);
    else
        this.timeoutId = setTimeout(this.intervalFunc, 0);
};
aiim.widget.popup.prototype.stop = function () {
    if(this.timeoutId)
        clearTimeout(this.timeoutId);
	this.timeoutId = 0;
};
aiim.widget.popup.prototype.step = function () {
    var elapsedTime = (new Date()).getTime() - this.startTime;
    var done = elapsedTime >= this.duration;
    var y;
    if(done)
        y = this.curY = this.endY;
    else {
        y = this.trans(elapsedTime,this.curY,this.endY-this.curY,this.duration);
    }
    this.el.style.top = y + 'px';
	if (!done)
		this.timeoutId = setTimeout(this.intervalFunc,this.interval);
};
aiim.widget.popup.prototype.open = function () {
    this.endY = this.dstY;
    this.start();
};
aiim.widget.popup.prototype.close = function () {
    if(!this.blocked)
    {
        this.endY = this.bgnY;
        this.start();
    }
};
aiim.widget.popup.prototype.stayopen = function (bool) {
    this.animate = !bool;
    this.blocked = bool;
};
/*= slider
--------------------------------------------------*/
aiim.widget.slider = function(el,opt) {
    this.el = aiim.util.getElement(el);
    this.curPanel = null;
    if(typeof opt.def != 'undefined') { //default index
		if (typeof opt.def == 'number')
			this.curPanel = this.getPanels()[opt.def];
		else
		    this.curPanel = this.getPanels()[0];
    }
    this.curPanel.style.display = 'block';
};
aiim.widget.slider.prototype.getGroup = function() {
	return aiim.util.getElementChildren(this.el)[0];
};
aiim.widget.slider.prototype.getPanels = function() {
	return aiim.util.getElementChildren(this.getGroup());
};
aiim.widget.slider.prototype.isKnownPanel = function(el)
{
    if(typeof el != 'undefined')
    {
        var len = this.getPanels().length;
        for(var i=0; i<len; ++i)
        {
            if(el = this.getPanels()[i])
                return true;
        }
    }
    return false;
}
aiim.widget.slider.prototype.showPanel = function(tabIndex) {
    try {
        if(typeof tabIndex == 'string')
        {
            var el = document.getElementById(tabIndex);
            if(typeof el != 'undefined' && this.isKnownPanel(el))
            {
                this.curPanel.style.display = 'none';
                this.curPanel = el;
            }
        }
        else if(typeof tabIndex == 'number')
        {
            this.curPanel.style.display = 'none';
            var el = this.getPanels()[tabIndex];
            if(typeof el != 'undefined')
            {   
                this.curPanel.style.display = 'none';
                this.curPanel = el;
            }

        }
        this.curPanel.style.display = 'block';
    }
    catch (ex) {}
};
/*= tabbed panels
--------------------------------------------------*/
aiim.widget.tabbed = function (el,opt) {
    this.el = aiim.util.getElement(el);
    this.mySlider = new aiim.widget.slider(this.getContentGroup(),{def:opt.def});
}; 
aiim.widget.tabbed.prototype.getTabGroup = function() {
	if (this.el) {
		var children = aiim.util.getElementChildren(this.el);
		if (children.length)
			return children[0];
	}
	return null;
};
aiim.widget.tabbed.prototype.getTabs = function() {
	var tabs = [];
	var tg = this.getTabGroup();
	if (tg) tabs = aiim.util.getElementChildren(tg);
	return tabs;
};
aiim.widget.tabbed.prototype.getContentGroup = function() {
	if(this.el) {
	    var children = aiim.util.getElementChildren(this.el);
	    if (children.length) {
	        return children[1];
	    }
	}
	return null;
};
aiim.widget.tabbed.prototype.showPanel = function(tabIndex){
    this.mySlider.showPanel(tabIndex);
};
/*= menu 
--------------------------------------------------*/
aiim.widget.menu = function (el,opt) {
    this.el = aiim.util.getElement(el);
    this.right = this.el.offsetWidth + this.el.offsetLeft;
    
    this.items = [];
    var lis = this.el.getElementsByTagName('li');
    for(var i=0;i<lis.length;++i) {
        this.items[i] = new aiim.widget.menu.li(lis[i],{menu:this});
    }
    for(var i=0;i<lis.length;++i) {
        this.items[i].el.style.position = 'static';
    }
};
aiim.widget.menu.li = function (el,opt) {
    this.el = aiim.util.getElement(el);
    this.menu = ((typeof opt != 'undefined' && opt.menu) ? opt.menu : null);

    var uls = this.el.getElementsByTagName('ul');
    this.submenu = null;
    if(uls.length>0) {
        this.submenu = new aiim.widget.menu.ul(uls[0],{menu:this.menu});
    }
    
    var on, off;
    var me = this;    
    
    if(this.submenu) {
        on = function () {
            me.togglePosition('relative');
            me.el.className += (aiim.util.browser.agent == 'Explorer' ? ' hover' : '');
            //me.el.className += ' hover';
            me.submenu.open(); 
        };
        off = function () {
            me.togglePosition(aiim.util.browser.agent == 'Explorer' ? 'static' : 'relative');
            me.el.className = me.el.className.replace(' hover', '');
            me.submenu.close(); 
        };
    } else {
        on = function () {
            me.togglePosition('relative');
            me.el.className += (aiim.util.browser.agent == 'Explorer' ? ' hover' : '');
            //me.el.className += ' hover';
        };
        off = function () {
            me.togglePosition(aiim.util.browser.agent == 'Explorer' ? 'static' : 'relative');
            me.el.className = me.el.className.replace(' hover', '');
        };
    }
    this.el.onmouseover = on;
    this.el.onmouseout = off;
    
    //this.el.style.position = 'static';
};
aiim.widget.menu.li.prototype.togglePosition = function (pos) {
//    if(this.el.style.position == 'relative') {
//        this.el.style.position = 'static';
//    } else {
//        this.el.style.position = 'relative';
//    }
    this.el.style.position = pos;
};
aiim.widget.menu.ul = function (el,opt) {
    this.el = aiim.util.getElement(el);
    this.menu = ((typeof opt != 'undefined' && opt.menu) ? opt.menu : null);
    if(this.menu) {
        var el = this.el;
        var left = 0;
        while(el != null && el.offsetParent != this.menu.el.offsetParent) {
            left += el.offsetLeft;
            el = el.offsetParent;
        }
        if(left + this.el.offsetWidth > this.menu.right) {
            var parent = this.el.parentNode;
            var offsetX = parent.offsetWidth - (this.el.offsetLeft - parent.offsetLeft);
            this.el.className += ' right';
        }
    } 
    if(aiim.util.browser.agent == 'Explorer' && aiim.util.browser.version < 7) {
        this.createIframe();
    }
};
aiim.widget.menu.ul.prototype.createIframe = function () {
    this.iframe = document.createElement('iframe');
	this.iframe.src = 'javascript:false';
	this.iframe.tabIndex = '-1';
	this.iframe.style.left = this.el.offsetLeft + 'px';
	this.iframe.style.top = this.el.offsetTop + 'px';
	this.iframe.style.width = this.el.offsetWidth + 'px';
	this.iframe.style.height = this.el.offsetHeight + 'px';
	this.iframe.style.visibility = 'hidden';
	this.iframe.style.filter = 'Alpha(opacity=0)';
	this.el.parentNode.appendChild(this.iframe);
};
aiim.widget.menu.ul.prototype.toggleIframe = function () {
    if(this.iframe != null) {
        if(this.iframe.style.visibility == 'hidden') {
            this.iframe.style.visibility = 'visible';
        } else {
            this.iframe.style.visibility = 'hidden';
        }
    }
};
aiim.widget.menu.ul.prototype.open = function () {
    this.el.style.visibility = 'visible';
    this.toggleIframe();
};
aiim.widget.menu.ul.prototype.close = function () {
    this.el.style.visibility = 'hidden';
    this.toggleIframe();
};
/*= pop desc box
--------------------------------------------------*/
aiim.widget.box = function (opt) {
    this.hasDropShadow = false;
    if(typeof opt != 'undefine') {
        if(typeof opt.shdw != 'undefined') {
            this.hasDropShadow = opt.shdw;
        }
    }    
    this.container = document.createElement("div");
    this.container.className = "info";
    if(this.hasDropShadow) {
        this.container.className += " drpshdw";
    }
    this.content = document.createElement("div");
    this.content.className = "content";
    
    this.container.appendChild(this.content);
};
aiim.widget.box.prototype.show = function () {
    this.container.style.display = 'block';  
};
aiim.widget.box.prototype.hide = function () {
    this.container.style.display = 'none';  
};
/*= content custom functions
--------------------------------------------------*/
function disclose(el) {
    var el = aiim.util.getElement(el);
    if(el.style.display != 'none') {
        el.style.display = 'none'
    } else {
        el.style.display = 'block'
    }
}
function info_s(el,opt) {
    var el = aiim.util.getElement(el);
    var parent = el.parentNode;
    if(typeof el.info != 'undefined') {
        el.info.show();
    } else {
        el.info = new aiim.widget.box({shdw:true});
        if(typeof opt != 'undefined') {
            if(typeof opt.html == 'string') {
                el.info.content.innerHTML = opt.html;
            }
            if(typeof opt.w == 'number') {
                el.info.content.style.width = opt.w + 'px';
            }
        }
        parent.insertBefore(el.info.container,el);
        el.info.show()
    }
}
function info_h(el) {
    var el = aiim.util.getElement(el);
    var parent = el.parentNode;
    if(typeof el.info != 'undefined') {
        el.info.hide();
    }
}
function scrollTop() {
    if (document.documentElement && document.documentElement.scrollTop)
	    document.documentElement.scrollTop = 0;
    else if (document.body)
	    document.body.scrollTop = 0;
}
function OpenInNewWindow(url)
{
    window.open(url,"_blank");
}
function postToNewWindow(t) { 
    var myForm = document.forms['aspnetForm'];
    if(typeof t=="undefined")
        t = "_blank";
    myForm.target = t;
    setTimeout("document.forms['aspnetForm'].target=''",0)
}
function DisableOnSubmit(btnObj,msg)
{
    if(typeof(msg)=='undefined')
    {
        msg = '';
    }
    var btnId = btnObj.getAttribute("id");
    setTimeout("document.getElementById('" + btnId + "').disabled=true", 0);
    setTimeout("__disableOnSubmit('" + btnId + "','" + msg + "');", 0);
}
function __disableOnSubmit(btnObj,msg)
{
    if(typeof(btnObj)=='string')
    {
        btnObj = document.getElementById(btnObj);
    }
    
    if(Page_IsValid)
    {
        btnObj.disabled = true;
        
        var btnId = btnObj.getAttribute("id");
        var imgId = btnId + "_image";
        var parent = btnObj.parentNode;
        var span = document.createElement('span');
        span.className = "ajaxloader";
        span.innerHTML = (typeof(msg)=='string' && msg!='') ? msg : 'Processing...';
        
        if(btnObj.nextSibling!=null)
        {
            parent.insertBefore(span, btnObj.nextSibling);
        }
        else
        {
            parent.appendChild(span);
        }
        
        if(document.images)
        {
            var img = new Image;
            parent.insertBefore(img, span);
            img.className = 'ajaxloaderImage';
            img.setAttribute("alt", "Please wait.");
            img.setAttribute("id", imgId);
            img.src = "/styles/img/ajax-loader.gif";
        }
        //
        
        setTimeout("document.getElementById('" + imgId + "').src='/styles/img/ajax-loader.gif';", 0);
    }
    else
    {
        btnObj.disabled = false;
    }
}
function doFeedBurner(targetID,containerID,e)
{
    var textbox = document.getElementById(targetID);
    var container = document.getElementById(containerID);
    if(typeof(textbox)!='undefined' && typeof(container)!='undefined')
    {
        if(typeof(e)!='undefined')
        {
            var keynum;
            if(window.event) 
            { 
                keynum = e.keyCode; 
            } 
            else if (e.which)
            { 
                keynum = e.which; 
            }
            if(keynum > 0 && keynum != 13)
            {
                return false;
            }
        }
        var searchString = textbox.value;
        if(typeof(searchString)!='undefined' && searchString.length>0)
        {
            var newForm = document.createElement('form');
            //newForm.action = "http://www.feedblitz.com/f/f.fbz?AddNewUserDirect";
            newForm.action = "http://www.aiim.org/ResourceCenter/newsletter.aspx"
            newForm.method = "POST";
            newForm.innerHTML = container.innerHTML;
            //newForm.target = "_blank";
            var q = newForm.elements['EMAIL'];
            if(typeof(q)!='undefined')
            {
                q.value = searchString
            }
            document.body.appendChild(newForm)
            newForm.submit();
            document.body.removeChild(newForm)
        }
    }
}
function doTheGoogle(targetID,containerID,e)
{
    var textbox = document.getElementById(targetID);
    var container = document.getElementById(containerID);
    if(typeof(textbox)!='undefined' && typeof(container)!='undefined')
    {
        if(typeof(e)!='undefined')
        {
            var keynum;
            if(window.event) 
            { 
                keynum = e.keyCode; 
            } 
            else if (e.which)
            { 
                keynum = e.which; 
            }
            if(keynum > 0 && keynum != 13)
            {
                return false;
            }
        }
        var searchString = textbox.value;
        if(typeof(searchString)!='undefined' && searchString.length>0)
        {
            var newForm = document.createElement('form');
            newForm.action = "http://googlebox.aiim.org/search";
            newForm.method = "GET";
            newForm.innerHTML = container.innerHTML;
            var q = newForm.elements['q'];
            if(typeof(q)!='undefined')
            {
                q.value = searchString
            }
            document.body.appendChild(newForm)
            newForm.submit();
            document.body.removeChild(newForm)
        }
    }
}
function enableZoomImages(keyword, match)
{
    var images = document.getElementsByTagName("img");
    var imagesLen = images.length;
    for(var i=0;i<imagesLen;++i)
    {
        var img = images[i];
        var parent = img.parentNode;
        var css = img.className;
        if(css.length>0 && css.indexOf(keyword)>-1)
        {
            var link = document.createElement('a');
            link.className = 'enlargeImage';
            link.innerHTML = '<div>(+) Enlarge image</div>';
            var src = img.getAttribute('src');
            src = src.replace(match, '.');
            link.setAttribute('href', src);
            link.setAttribute('target', 'blank');
            link.appendChild(img);
            parent.appendChild(link);
        }      
    }
}
function printThis()
{
    var bag = document.createElement("span");
    var c = document.createElement("span");
    c.className = "printThis"
    bag.appendChild(c)
    var a = document.createElement("a");
    a.innerHTML = "Print";
    a.setAttribute("href", "#");
    a.setAttribute("onclick", "window.print();return false;");
    c.appendChild(a);
    
    document.write(bag.innerHTML);
}

////
var url = function (url) { this.url = url; }
url.prototype.go = function(target) {
    if(typeof target == 'string') 
        window.open(this.url, target);
    else 
        window.location = this.url;
};

////
var topiclinks = function(el,opt) {
    this.element = aiim.util.getElement(el);
    
    if(typeof this.element != 'undefined' && this.element != null)
    {
        this.items = this.element.getElementsByTagName('span');
        this.maxvisible = typeof opt != 'undefined' && typeof opt.maxvisible != 'undefined' ? opt.maxvisible : 0;
        this.button = typeof opt != 'undefined' && typeof opt.button != 'undefined' ? aiim.util.getElement(opt.button) : undefined;

        if(this.maxvisible >= 0 && this.maxvisible < this.items.length)
        {
            this.hideall();
        }
        else
        {
            this.hide(this.button);
        }
    }
};
topiclinks.prototype.show = function (el) {
    el = aiim.util.getElement(el);
    el.style.display = '';

    this.hide(this.button)
};
topiclinks.prototype.hide = function (el) {
    el = aiim.util.getElement(el);
    el.style.display = 'none';
};
topiclinks.prototype.showall = function () {
    var len = this.items.length;
    for(var i=0; i<len; ++i)
    {
        this.show(this.items[i]);
    }
};
topiclinks.prototype.hideall = function () {
    var len = this.items.length;
    for(var i=this.maxvisible; i<len; ++i)
    {
        this.hide(this.items[i]);
    }
};
function encodeHtml(el) {
    el = aiim.util.getElement(el);
    if(typeof el.value != 'undefined')
    {
        var content = el.value
        content = content.replace(/</g,'&lt;');
        content = content.replace(/>/g,'&gt;');
        el.value = content;
    }
}
function WebForm_FireDefaultLinkButton(event, target) { 
    if (event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) { 
        var defaultButton; 
        if (__nonMSDOMBrowser) { 
            defaultLinkButton = document.getElementById(target); 
        } 
        else { 
            defaultLinkButton = document.all[target]; 
        } 
        if (defaultLinkButton && typeof(defaultLinkButton.href) != "undefined") { 
            window.location = defaultLinkButton.href;
            event.cancelBubble = true; 
            if (event.stopPropagation) event.stopPropagation(); 
            return false; 
        } 
    } 
    return true;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//// Nifty
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

///* Nifty Corners Cube - rounded corners with CSS and Javascript
//Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

//This program is free software; you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation; either version 2 of the License, or
//(at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//*/

//var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);}
//var oldonload=window.onload;if(typeof(NiftyLoad)!='function')NiftyLoad=function(){};if(typeof(oldonload)=='function')
//window.onload=function(){oldonload();AddCss();NiftyLoad()};else window.onload=function(){AddCss();NiftyLoad()};function AddCss(){niftyCss=true;}
//function Nifty(selector,options){if(niftyOk==false)return;if(niftyCss==false)AddCss();var i,v=selector.split(","),h=0;if(options==null)options="";if(options.find("fixed-height"))
//h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)
//Rounded(v[i],options);if(options.find("height"))SameHeight(selector,h);}
//function Rounded(selector,options){var i,top="",bottom="",v=new Array();if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.find("tl")){top="both";if(!options.find("tr"))top="left";}
//else if(options.find("tr"))top="right";if(options.find("bl")){bottom="both";if(!options.find("br"))bottom="left";}
//else if(options.find("br"))bottom="right";}
//if(top==""&&bottom==""&&!options.find("none")){top="both";bottom="both";}
//v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!="")AddTop(v[i],top,options);if(bottom!="")AddBottom(v[i],bottom,options);}}
//function AddTop(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
//else{bk=getParentBk(el);border=Mix(color,bk);}
//d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Top");if(options.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}
//else if(options.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}
//else d.style.marginBottom=(p-5)+"px";for(i=1;i<=lim;i++)
//d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop="0";el.insertBefore(d,el.firstChild);}
//function AddBottom(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
//else{bk=getParentBk(el);border=Mix(color,bk);}
//d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Bottom");if(options.find("small")){d.style.marginTop=(p-2)+"px";btype+="s";lim=2;}
//else if(options.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}
//else d.style.marginTop=(p-5)+"px";for(i=lim;i>0;i--)
//d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);}
//function CreateStrip(index,side,color,border,btype){var x=CreateEl("b");x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}
//else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}
//return(x);}
//function CreateEl(x){return(document.createElement(x));}
//function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)
//el.style.display="inline-block";}
//function SameHeight(selector,maxh){var i,v=selector.split(","),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}
//for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;els[i].style.height="auto";}
//for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";nc=els[i].lastChild;if(nc.className=="niftycorners")
//els[i].insertBefore(t,nc);else els[i].appendChild(t);}}}
//function getElementsBySelector(selector){var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;if(selector.find("#")){if(selector.find(" ")){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}
//return(objlist);}
//else{s=selector.split("#");tag=s[0];selid=s[1];if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}}}
//if(selector.find(".")){s=selector.split(".");tag=s[0];selclass=s[1];if(selclass.find(" ")){s=selclass.split(" ");selclass=s[0];tag2=s[1];}}
//var v=document.getElementsByTagName(tag);if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}
//for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}
//return(objlist);}
//function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")
//el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);}
//function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))
//return("transparent");if(c.find("rgb"))c=rgb2hex(c);return(c);}
//function getPadding(x,side){var p=getStyleProp(x,"padding"+side);if(p==null||!p.find("px"))return(0);return(parseInt(p));}
//function getStyleProp(x,prop){if(x.currentStyle)
//return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)
//return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);}
//function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}
//return("#"+hex);}
//function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}
//return("#"+r[0]+r[1]+r[2]);}

///*= Nifty Corners Cube Start Up
//--------------------------------------------------*/
//NiftyLoad = function() {
//    Nifty("*.beigebox", "small");
//    Nifty("*.greenbox", "small");
//    Nifty("*.silverbox", "small");
//    Nifty("*.lightgraybox", "small");
//    Nifty("*.graybox", "small");
//    Nifty("*.limegreenbox", "small");
//    Nifty("*.lightbluebox", "small");
//    Nifty("*.orangebox", "small");
//    Nifty("div.ad a.go", "small");
//    
////    enableZoomImages("zoom", "_small.");
//}
