function getContent(n,d,e) {
	return true;
	$(d).update('<center><img src="/img/progressbar.gif"></center>');

	new Ajax.Request('/loadContent.php?content='+n, {
	  method: 'post',
	  onSuccess: function(transport) {
		$(d).hide();
		$(d).update(transport.responseText);
		if(e=="slide") {
			Effect.SlideDown(d);
		} else {
			Effect.BlindDown(d, { duration: 1.0 });
		}
	  }
	});
	
	if(e!="slide") {
		window.location = "#"+n+"|"+d;
	}
	return false;
}

function loadPicture(n,d,a) {
    $(d).src = n;
	if (arguments.length==3) {
		try{
			$$('a.pic_links').each(function(item){item.className='pic_links';item.setStyle({fontWeight: '',fontSize: 12,color: ''});});
			a.addClassName('pic_links_currrent');
			a.setStyle({fontWeight: 'bold',fontSize: 14,color: '#000000'});
			a.blur();
		}catch(e){}
	}
}

function openClose(theID) {
	try {
		if ($(theID).visible()) {
			$(theID).hide()
			$("tick_"+theID).update("<img src='/img/arrow1.gif' alt='+' width='13' height='11'>"); 
		} else {
			$(theID).show()
			$("tick_"+theID).update("<img src='/img/arrow2.gif' alt='-' width='13' height='11'>"); 
		}
	} catch(e){alert(e)}
}

function loadGoodSubPage() {
	var url = window.location.href;

	var a = url.split("#");
	var tag = a[a.length-1];
	if(!tag.blank()) {
		a = tag.split("|");
		if(a.length==2) {
			file = a[0];
			divel = a[1];
			getContent(file,divel);
		}
	}
}

var current_video = 0;
var current_video_img = "";
function show_video(n) {
try{
	if(n == current_video) return true;
	
	if(current_video>0)
	$('video_img_'+current_video).src = current_video_img;
	
	$('video_contnet').hide();
	$('video_contnet').update($('video_contnet_'+n).innerHTML);
	$('video_contnet').show();
	current_video_img = $('video_img_'+n).src;
	$('video_img_'+n).src = "/img/video-player.png";
	current_video = n;
} catch(e){}
}

function rotateCaseStudies(n,a) {
	for(i=1;i<=3;i++) {
		$('casethumb'+i).hide();
	}
	Effect.SlideDown('casethumb'+n);
	if (arguments.length==2) {
		try{
			$$('a.rotate_links').each(function(item){item.setStyle({fontWeight: 'normal',fontSize: 12});});
			a.setStyle({fontWeight: 'bold',fontSize: 14});
			a.blur();
		}catch(e){}
	}
}

function rotatePrintArticles(n,j,a) {
	for(i=1;i<=j;i++) {
		$('page_'+i).hide();
	}
	Effect.SlideDown('page_'+n);
	if (arguments.length==3) {
		try{
			$$('a.rotate_links').each(function(item){item.setStyle({fontWeight: 'normal',fontSize: 12});});
			a.setStyle({fontWeight: 'bold',fontSize: 14});
			a.blur();
		}catch(e){}
	}
}
Event.observe(window,'load',function() {
	var nav_links = $$('div.links a');
	var url = window.location.href.split("?")[0];

	nav_links.each(function(name, i) {
		if(nav_links[i]==url) {
			nav_links[i].setStyle({'fontWeight':'bold','color':'#333333'});
			nav_links[i].removeAttribute('href');
		}
	});

});