/* ========================================================== */
/* File name: register.js                                     */
/* Description: RightSizer register JS-file                   */
/* Create data: August 2008                                   */
/* Programmed by Bodro (Bodrov Vasiliy)                       */
/* Contact: vbodrov@v-kernel.com                              */
/* ========================================================== */

var vote_ajax = null;

function VotingThanksShowAndAutoHide(){
	showDIV("thanksVotedDIV");
	showHDIV("shadowDIV");
	setTimeout("hideDIV('thanksVotedDIV'); hideDIV('shadowDIV');", 3000);
}

function VotingForRow(id,vote,category){
	url = 'insertVoteAJ.php';
	vars = "id="+id+"&vot="+vote;
	vote_ajax.LoadFORMDocPOST(url, vars);
}

function vote_HandlerTimeOut(){
	//alert('Sorry! Not connect with server! Try later!');
}

function vote_HandlerFAILED(num, txt){
	alert('Sorry! Failed: ' + txt);
}

function VoteXMLOK(xml){
	var response = null;
	response =  xml.documentElement;
	var result = response.getElementsByTagName('result')[0].firstChild.data;
if (result==1)
	SampleDataStore.reload();
}

vote_ajax = new Ajax();
vote_ajax.SetHandlerTimeOut(vote_HandlerTimeOut);
vote_ajax.SetHandlerFAILED(vote_HandlerFAILED);
vote_ajax.SetHandlerXMLOK(VoteXMLOK);


/* ========================================================== */
/* End of file                                                */
/* ========================================================== */
