// Variables
// Function: Poll Finish Loading Text
function who_unloading_text() {
	if(who_show_loading) {
		document.getElementById('who-loading').style.display = 'none';
	}
}

// Function: Poll Fade In Text
function who_fadein_text() {
	if(who_fadein_opacity == 90) {
		who_unloading_text();
	}
	if(who_fadein_opacity < 100) {
		who_fadein_opacity += 10;
		if(is_opera) {
			who_fadein_opacity = 100;
			who_unloading_text();
		} else if(is_ie) {
			if(who_show_fading) {
				//document.getElementById('who-show').filters.alpha.opacity = who_fadein_opacity;
				document.getElementById('who-show').style.filter = 'alpha(opacity=' + who_fadein_opacity + ')';
			} else {
				who_fadein_opacity = 100;
				who_unloading_text();
			}
		} else	 if(is_moz) {
			if(who_show_fading) {
				document.getElementById('who-show').style.MozOpacity = (who_fadein_opacity/100);
			} else {
				who_fadein_opacity = 100;
				who_unloading_text();
			}
		}
		setTimeout("who_fadein_text()", 100); 
	} else {
		who_fadein_opacity = 100;
		who_in_progress = false;
	}
}


// Function: Process Poll's Result
function who_show() {
	if(who_fadeout_opacity > 0) {
		who_fadeout_opacity -= 10;
		if(is_opera) {
			who_fadeout_opacity = 0;
		} else if(is_ie) {
			if(who_show_fading) {
				document.getElementById('who-show').style.filter = 'alpha(opacity=' + who_fadeout_opacity + ')';
				//document.getElementById('who-show').filters.alpha.opacity = who_fadeout_opacity;
			} else {
				who_fadeout_opacity = 0;
			}
		} else if(is_moz) {
			if(who_show_fading) {
				document.getElementById('who-show').style.MozOpacity = (who_fadeout_opacity/100);
			} else {
				who_fadeout_opacity = 0;
			}
		}
		setTimeout("who_show()", 100); 
	} else {
		who_fadeout_opacity = 0;
		who.reset();
		who.setVar("who", who_id);
		who.method = 'GET';
		who.element = 'who-show';
		who.onCompletion = who_fadein_text;
		who.runAJAX();
		who_fadein_opacity = 0;
		who_fadeout_opacity = 100;
	}
}


// Function: Poll Loading Text
function who_loading_text() {
	if(who_show_loading) {
		document.getElementById('who-loading').style.display = 'block';
	}
}

// Function: When User View Poll's Result
function request_author(requested_id) {
	if(!who_in_progress) {
		who_in_progress = true;
		who_id = requested_id;
		who_loading_text();
		who_show();
	} else {
		alert(who_text_wait);
	}
}


