function getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue){
	try {
	    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	    var arrReturnElements = new Array();
	    var oAttributeValue = (typeof strAttributeValue != "undefined")? new RegExp("(^|\\s)" + strAttributeValue + "(\\s|$)") : null;
	    var oCurrent;
	    var oAttribute;
	    for(var i=0; i<arrElements.length; i++){
	        oCurrent = arrElements[i];
	        oAttribute = oCurrent.getAttribute(strAttributeName);
	        if(typeof oAttribute == "string" && oAttribute.length > 0){
	            if(typeof strAttributeValue == "undefined" || (oAttributeValue && oAttributeValue.test(oAttribute))){
	                arrReturnElements.push(oCurrent);
	            }
	        }
	    }
	    return arrReturnElements;
	}catch(err){
		
	}
}

function changePhoto(filename,id){
	document.getElementById('project-image').src = "/include/portfolio/images[528x316]/"+filename;

	$(id).siblings("img").attr("class", "project-images-list-item");
	$(id).attr("class", "project-images-list-item-active");
}


function selectFirstPhoto(){
	document.getElementById('thumb_0').className = 'project-images-list-item-active';
}