function selectMover(thisdiv,divname){
	moverdivs = document.getElementById('movers_list').childNodes;
	x=0;
	for(x=0;x<moverdivs.length;x++){
		try{
			if(moverdivs[x].id==divname){
				moverdivs[x].style.display='block';
			}else{
				moverdivs[x].style.display='none';
			}
		}catch(e){
			
		}
	}
	moverdivlinks = thisdiv.parentNode.parentNode.childNodes;
	x=0;
	for(x=0;x<moverdivlinks.length;x++){
		try{
			moverdivlinks[x].className='';
		}catch(e){
			
		}
	}
	thisdiv.parentNode.className="selected_rising";
}

function scaleImages(){
	postimages = document.getElementById('mainContent').getElementsByTagName("img");
	for (x=0;x<postimages.length ;x++ )
	{
		//alert(postimages[x].src+" : "+postimages[x].width);
		if(postimages[x].width>340&&postimages[x].width!=411){
			newheight = 340/postimages[x].width*postimages[x].height;
			postimages[x].width=340;
			postimages[x].height=newheight;
		}
	}
}
function fixTargets(){
	contentlinks = document.getElementById('mainContent').getElementsByTagName("a");
	for (x=0;x<contentlinks.length ;x++ )
	{
		contentlinks[x].setAttribute("target","_blank");
	}
}
function cleanUpContent(){

	scaleImages();
	fixTargets();

}
function expandThis(thisposition){

	divlist = thisposition.parentNode.childNodes;
	divlist=divlist[0].childNodes;
	for (x=0;x<divlist.length ;x++ )
	{
		try{
			if(divlist[x].id=="descriptionholder"){
				newHeight = divlist[x].childNodes[0].offsetHeight;
				if(newHeight+"px"!=divlist[x].style.height){
					divlist[x].style.height=newHeight+"px";
					thisposition.firstChild.src="img/b_seeless.gif";
				}else{
					divlist[x].style.height="180px";
					thisposition.firstChild.src="img/b_seemore.gif";
				}
			}
		}catch(e){
		}
	}
}
function givelinks()
{
	var anchors = document.getElementsByTagName('a');
	var value = null;
	for(var i = 0;i < anchors.length;i++)
	{
		anchor = anchors[i];
		var value = anchor.href;
		if(value.indexOf("http://search.yahoo.com/search?p=") != -1)
		{
			value = value.replace("http://search.yahoo.com/search?p=","search.php?q=");
			value = value.replace("&cs=bz","");
			anchor.href = value+"&action=feed_defined_search";
			anchor.target = "";
			//anchor.rel = "nofollow";
		}
	}
}
