function init(){
	resize_photos();
}

document.getElementsByClassName = function(clsName){
    var retVal = new Array();
    var elements = document.getElementsByTagName("*");
    for(var i = 0;i < elements.length;i++){
        if(elements[i].className.indexOf(" ") >= 0){
            var classes = elements[i].className.split(" ");
            for(var j = 0;j < classes.length;j++){
                if(classes[j] == clsName)
                    retVal.push(elements[i]);
            }
        }
        else if(elements[i].className == clsName)
            retVal.push(elements[i]);
    }
    return retVal;
}

function resize_photos() {
var scalePhotosSmall = document.getElementsByClassName('product-image-small');
var scalePhotosFull = document.getElementsByClassName('product-image-full');

for (i=0; i < scalePhotosSmall.length; i++) {
	if(scalePhotosSmall[i].height>85){
    	scalePhotosSmall[i].style.width=Math.round(scalePhotosSmall[i].width * (85/scalePhotosSmall[i].height)) + 'px';
     	scalePhotosSmall[i].style.height='85px';
     }
}

for (i=0; i < scalePhotosFull.length; i++) {
	if(scalePhotosFull[i].height>250){
    	scalePhotosFull[i].style.width=Math.round(scalePhotosFull[i].width * (250/scalePhotosFull[i].height)) + 'px';
     	scalePhotosFull[i].style.height='250px';
     }
}
}

function resize_photo(obj){
if(obj.height>85){
    	obj.style.width=Math.round(obj.width * (85/obj.height)) + 'px';
     	obj.style.height='85px';
     }
}

function electroland_cities(e,bool) {
	if (bool) {
		document.getElementById("orase_elland").style.display = "";
	} else {
		document.getElementById("orase_elland").style.display = "none";
	}
}
