var defaultInputMessage = new Array();

function doSubmitCmt() {
	if(!hasLoggedOn) {
    alert('You have to login before doing this!');
		return false;
  }
	
  newsid = $('#cmt').attr('ref_id');
  review = $('#cmt').val();
	if( review == 'Write your comment here' || review == '') {
    alert('Please write your comment');
//    $('#cmtNews').html('Your comment is sending to server.');
//    review = '';
  } else {
    $('#cmtNews').html('Your comment is sending to server.');
	
//	pid = $('#cmt').attr('ref_platform');
	$('#cmtNews').load('/ajax/cmtNews.php?newsid='+newsid + '&review='+escape(review), 
     setTimeout( 'window.location.reload();', 800)
//		  $('#fade , .popup_block').delay(800).fadeOut(function() {
//			  $('#fade, a.close').remove();
//			})
		);
	}
}


function setInputDefault(box, msg) {
  defaultInputMessage[box] = msg;
}

function  resetInput(box,status) {
  curr = $('#'+box).val();
	alert(curr);
	msg = defaultInputMessage[box];
}
/*
function changePlatform() {
  d = $('#buy4platform');
	appid = d.attr('ref');
	pid = d.val();
	window.location.href = '?cr='+pid;
}
*/

