function markRating(mark){for(i=1;i<=5;i++){$('#bRate'+i).removeClass('selected');$('#bRate'+i).removeClass('selectedHalf');if(mark>0){if(mark>=1){$('#bRate'+i).addClass("selected");}else{if(mark>=.3&&mark<=.7){$('#bRate'+i).addClass("selectedHalf");}else if(mark>.7){$('#bRate'+i).addClass("selected");}}}
mark--;}}
function rateMe(bid,rating){var showResponse=function(originalRequest){$('#itemRate').html(originalRequest);};var showProgress=function(){$('#itemRateInner').html('processing...');}
var params="bid="+bid+"&rating="+rating;url=publicdomainobj+"budget-finds/rate.xml.php";$.ajax({type:"POST",url:url,data:params,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/rate");}
function validateFind(){var err=0;if(trim($('#uploadPhoto').val())==''){err++;$('#uploadPhoto').parent().addClass('formError');}
else $('#uploadPhoto').parent().removeClass('formError');if(trim($('#findTitle').val())==''){err++;$('#findTitle').parent().addClass('formError');}
else $('#findTitle').parent().removeClass('formError');if(trim($('#timestamp').val())==''){err++;$('#timestamp').parent().addClass('formError');}
else $('#timestamp').parent().removeClass('formError');if(trim($('#findPrice').val())==''){err++;$('#findPrice').parent().addClass('formError');}
else $('#findPrice').parent().removeClass('formError');if(trim($('#findWhere').val())==''){err++;$('#findWhere').parent().addClass('formError');}
else $('#findWhere').parent().removeClass('formError');if(trim($('#findWhy').val())==''){err++;$('#findWhy').parent().addClass('formError');}
else $('#findWhy').parent().removeClass('formError');if(trim($('#fotoValidateIE').val())==0){err++;$('#uploadPhoto').parent().addClass('formError');}
else $('#uploadPhoto').parent().removeClass('formError');if(err==0){returnval=true;}
else{alert('You have not filled out all the required fields correctly. \n\n Please submit the required information.');returnval=false;}
return returnval;}
function testFileType(){fileName=$('#uploadPhoto').val();fileTypes=new Array('.gif','jpg','png','jpeg');if(!fileName)return;dots=fileName.split(".")
fileType="."+dots[dots.length-1];if(fileTypes.join(".").indexOf(fileType.toLowerCase())!=-1){$('#uploadPhoto').parent().removeClass('formError');$('#fotoValidateIE').val('1');}else{$('#uploadPhoto').val('');$('#fotoValidateIE').val('0');$('#uploadPhoto').parent().addClass('formError');alert("Please only upload files that end in types: \n\n"+(fileTypes.join(" ."))+"\n\nPlease select a new file and try again.");}}
function pickCloset(year){if(year!="")location.href=publicdomain+"style-beauty/cosmo-closet/"+year+"/";}
