function showtable() {
    var table = document.getElementById('pricingtable');
    currentStyle = getStyle(table, 'display');
    if (currentStyle == 'none') {
        table.style.display = 'block';
    } else {
        table.style.display = 'none';
    }
}

function activateSearch () {
	var e = document.getElementById('search_input');
	if (e && e.className != '') {
		e.className = '';
		e.value = '';
	}
}

function getStyle(oElm, strCssRule){
    var strValue = "";
    if(document.defaultView && document.defaultView.getComputedStyle){
        strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
    }
    else if(oElm.currentStyle){
        strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
            return p1.toUpperCase();
        });
        strValue = oElm.currentStyle[strCssRule];
    }
    return strValue;
}


function show_screen_thumb(itemid, clickable) {
    var image = document.getElementById('screenshot_thumb');
    image.src = '/cgi-bin/items.cgi?_rm=display_blob;_size=l;_name=Image;_item='+itemid;
    if (clickable == 1) {
        image.setAttribute('onclick', 'openup(\''+itemid+'\')');
        // next line is for IE
        image.onclick = new Function("openup('"+itemid+"');"); 
        image.className = 'clickable';
    } else {
        image.setAttribute('onclick', '');
        // next line is for IE
        image.onclick = new Function("");
        image.className = '';
    }
}


function openup(itemid) {
    window.open('/cgi-bin/items.cgi?_rm=show_image;_size=screenshot;_name=Image;_item='+itemid, 'screenshot','width=850,height=640,scrollbars=yes,resize=no');
}



function set_spacers(spacer1, spacer2, newurl) {
    var spacer1_img = document.getElementById(spacer1);
    var spacer2_img = document.getElementById(spacer2);
    spacer1_img.src=newurl;
    spacer2_img.src=newurl;
}

function inject_casestudy_carousel() {
if (DetectFlashVer(8,0,0)) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="590" height="300" id="site_carousel" align="middle"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/flash/site_carousel.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><embed src="/flash/site_carousel.swf" quality="high" bgcolor="#ffffff" width="590" height="300" name="site_carousel" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>');
}
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
