//document.onclick=checkwaiting;
var waiting
var delay=0;
function hideAllMenusShare() {
	if (!waiting){
		for (counter=1; counter<=rowcount; counter++) {
			document.getElementById("innersharebox"+counter).style.display = "none";
			document.getElementById("sharebox"+counter).style.zIndex = 1
		}
	}
} 
function HideContentShare(d) {
	if (!waiting){
		document.getElementById("innersharebox"+d).style.display = "none";
		document.getElementById("sharebox"+d).style.zIndex = 1
	}
}
function ShowContentShare(d) {
	hideAllMenusShare();
	if (!waiting){
		document.getElementById("innersharebox"+d).style.display = "block";
		document.getElementById("sharebox"+d).style.zIndex = 30
	}
}
function ReverseContentDisplayShare(d) {
if(document.getElementById("innersharebox"+d).style.display == "none") {
document.getElementById("innersharebox"+d).style.display = "block";
document.getElementById("sharebox"+d).style.zIndex = 30
} else {
document.getElementById("innersharebox"+d).style.display = "none";
document.getElementById("sharebox"+d).style.zIndex = 1
}
}
///////////
function hideAllMenusTags() {
		for (counter=1; counter<=rowcount; counter++) {
			document.getElementById("innertagsbox"+counter).style.display = "none";
			document.getElementById("tagsbox"+counter).style.zIndex = 1
		}
} 
function HideContentTags(d) {
		document.getElementById("innertagsbox"+d).style.display = "none";
		document.getElementById("tagsbox"+d).style.zIndex = 1
}
function ShowContentTags(d) {
	hideAllMenusTags();
		document.getElementById("innertagsbox"+d).style.display = "block";
		document.getElementById("tagsbox"+d).style.zIndex = 30
}
function ReverseContentDisplayTags(d) {
if(document.getElementById("innertagsbox"+d).style.display == "none") {
document.getElementById("innertagsbox"+d).style.display = "block";
document.getElementById("tagsbox"+d).style.zIndex = 30
} else {
document.getElementById("innertagsbox"+d).style.display = "none";
document.getElementById("tagsbox"+d).style.zIndex = 1
}
}
///////////
function hideAllMenusRing() {
	if (!waiting){
		for (counter=1; counter<=rowcount; counter++) {
			document.getElementById("innerringtone"+counter).style.display = "none";
			document.getElementById("ringtone"+counter).style.zIndex = 1
		}
	}
} 
function HideContentRing(d) {
	if (!waiting){
		document.getElementById("innerringtone"+d).style.display = "none";
		document.getElementById("ringtone"+d).style.zIndex = 1
	}
}
function ShowContentRing(d) {
	hideAllMenusRing();
	if (!waiting){
		document.getElementById("innerringtone"+d).style.display = "block";
		document.getElementById("ringtone"+d).style.zIndex = 30
	}
}
function ReverseContentDisplayRing(d) {
if(document.getElementById("innerringtone"+d).style.display == "none") {
document.getElementById("innerringtone"+d).style.display = "block";
document.getElementById("ringtone"+d).style.zIndex = 30
} else {
document.getElementById("innerringtone"+d).style.display = "none";
document.getElementById("ringtone"+d).style.zIndex = 1
}
}
////////////
function waitforajax(src, destId, progress, subtd, keepenabled){
	waiting=true;
	document.getElementById(progress).style.display = "inline";
	if (!keepenabled){
		document.getElementById(subtd).onclick = "";
		
	}else{
		
	}
	document.getElementById(subtd).style.backgroundImage = 'url(/assets/navigation/sub-nav-back-over.gif)';
		document.getElementById(subtd).style.color="#99FF00";
	timerID  = window.setTimeout("ajaxLoader('"+src+"', '"+destId+"', '"+progress+"', '"+subtd+"', '"+keepenabled+"')", 1000);
}
function HideCover(d) {
		document.getElementById(d).style.display = "none";
}
function ShowCover(d) {
		document.getElementById(d).style.display = "block";
}