/*alert ("image-switch.js");*/

function linkswap () {
	/*var mainbody=document.getElementById('mainContent').getAttribute('classname');*/
	var mainbody='showcase'
	
	if (mainbody == 'about ') {
	  return;
	} else {
	/*alert ("linkswap func");*/

		/* Change placeholder pic (nodesinblock-40) for 1st pic in the Node*/
		var pics=document.getElementById('block-system-main').getElementsByTagName('img');
		var firstPic=pics[0].parentNode;
		var imgEls = document.getElementById('nodesinblock-43').getElementsByTagName('img');
		
		for (var i = 0, imgEl; imgEl = imgEls[i]; i++) {
			imgEl.src = firstPic;
				/*imgEl.height = "";
				imgEl.height = imgEl.removeAttribute("height");*/
			imgEl.style.height = '375px';
			imgEl.style.width = '500px';
			imgEl.name = 'swap';
				/*alert("imgsrc:"+imgEls[i].src);
				alert("new imgsrc:"+firstPic);*/
		}
		
		/* Add image switching to the onClick or onMouseOver events */
		/*var aEls = document.getElementById('node-showcase-39').getElementsByTagName('img');*/
		var aEls = document.getElementById('block-system-main').getElementsByTagName('img');
		for (var i = 0, aEl; aEl = aEls[i]; i++) {
				/*aEl.parentNode.href = "#";*/
				/*aEl.parentNode.onclick = aEl.parentNode.setAttribute("onclick","imgSwap()");*/
				/*aEl.onclick = aEl.setAttribute("onclick","imgSwap('"+aEl.href+"')");*/
				/*aEl.parentNode.onclick = "";  Set onclick to "" - done better below */
				/*aEl.parentNode.removeAttribute("onclick");*/
			
			aEl.parentNode.setAttribute("onclick","swap.src='"+aEl.parentNode.href+"'; return false")
				/*alert(aEl.parentNode.href);*/
			aEl.parentNode.setAttribute("onMouseOver","swap.src='"+aEl.parentNode.href+"'; return false")
				/*aEl.parentNode.removeAttribute("href");  Remove HREF from A tag*/
			/*aEl.parentNode.removeAttribute("rel");  /*Remove REL from A tag*/
				/*aEl.onclick = aEl.setAttribute("onclick","imgSwap('"+aEl.href+"')");*/
				/*aEl.onclick = aEl.setAttribute("onclick","swap.src=this.href; return false");*/
				/*onclick="swap.src=this.href; return false"*/
			aEl.rel = "";
		}
	}

}


