function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}
Array.prototype.unique=function(){
	if(this.length<2) [this[0]]||[];
	var arr=[];
	for(var i=0;i<this.length;i++){
		arr.push(this.splice(i--,1));
		for(var j=0;j<this.length;j++){
			if(this[j]==arr[arr.length-1]){
				this.splice(j--,1);
			}
		}
	}
	return arr;
}



function resize(){
	//$("img[rel~=r]").css({ width: "202", height: "77" });
	$("img[rel~=:]").each(function(i){
		$(this).load(function(){setImg(this)}); 
		setImg(this);
	}); 
}

function setImg(img){
	rel = $(img).attr("rel").split(":");
	w = rel[0];
	h = rel[1] == "" ? w : rel[1];
	iswrap = rel[2];
	if (img.width>img.height) {
		if(img.width>w) img.width=w;
	} else {
		if(img.height>h) img.height=h;
	}
	
	if(iswrap!=0) {
		if ($(img).parent().is("a")) {
			$(img).parent("a").wrap('<div style="width:'+w+'px;height:'+h+'px;text-align:center;"></div>');
		} else {
			$(img).wrap('<div style="width:'+w+'px;height:'+h+'px;text-align:center;"></div>');
		}
	}
}