
function re(cels) {
	document.location.href=cels;	
}

//////////////////////////////////// HS resize

function hsresize() {
   var obj = window.parent.hs;
   if(obj){
   		var exp = obj.getExpander();
   		if (exp) exp.reflow();
   }
}



//////////////////////////////////// LimitText

function limitText(limitField, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	}
}



//////////////////////////////////// Tooltips

$(function() {
	
	$('.service, .iconprof, .profinfoact, .profinfoinact, .profinfodisabled, .quest').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	showBody: " - ",
	fade: 0
	//fixPNG: true
	});
	
});


function chkStarsEdit(){
	val = document.getElementById('cat').options[document.getElementById('cat').selectedIndex].value;
	t = val.split(":");
	
	if(document.getElementById('cat2')){
		val2 = document.getElementById('cat2').options[document.getElementById('cat2').selectedIndex].value;
		t2 = val2.split(":");
		if((t[2] == 1) || (t2[2] == 1)){
			show('trstars');
		} else {
			hide('trstars');
		}
	} else {
		if(t[2] == 1){
			show('trstars');
		} else {
			hide('trstars');
		}
	}
}

//////////////////////////////////// Show / Hide

function showhide(hidewhat){
	hideobject = document.getElementById(hidewhat);
	hideobject.style.display = hideobject.style.display=="none" ? "" : "none";
}

function show(showwhat){
	showobject = document.getElementById(showwhat);
	showobject.style.display = "";
}

function hide(hidewhat){
	hideobject = document.getElementById(hidewhat);
	hideobject.style.display = "none";
}

///////////////////////////////// POP ups

function openfromPOPtouMsg(t){
	obj = parent.window.document.getElementById('toupop');
	obj.href = 'inc/minipop.php?'+t;
	obj.onclick();
}
