function displayHideDetails()
{
	if (document.getElementById('logoId').style.display == 'none') {
		document.getElementById('logoId').style.display = 'block'
		document.getElementById('imgStatus').src='http://www.logomyway.com/images/hidecontestbrief.png'; 
	} else {
		document.getElementById('logoId').style.display = 'none'
		document.getElementById('imgStatus').src='http://www.logomyway.com/images/showcontest.png'; 
	}
}

//Check email validation
function ValidEmail(elementName)
{
	var eValid = new RegExp();
	eValid.compile("^[A-Za-z0-9-._]+@[A-Za-z0-9-._]+.[A-Za-z.]+.[A-Za-z.]+$"); // email validation Regex
	
	if(!eValid.test(elementName)) {
		return false;
	}  else {
		return true;
	}
}

function validateContest(obj)
{
	if(trim(obj.bussiness_name.value))
	{
		obj.bussiness_name.value = "";
		obj.bussiness_name.style.background="#d00000";
		obj.desc.style.background="";
		obj.bussiness_name.focus();
		return false;
	
	}
	
	if(trim(obj.desc.value))
	{
		obj.desc.value = "";		
		obj.desc.style.background="#d00000";
		obj.bussiness_name.style.background="";
		obj.desc.focus();
		return false;
	}
	
	return true;
}

function validateStartlogo(obj)
{
//for start a logo page
	if(trim(obj.businessName.value))
	{
		obj.businessName.value = "";
		obj.businessName.style.background="#d00000";
		obj.descriptions.style.background="";
		obj.businessName.focus();
		return false;
	
	}
	
	if(trim(obj.descriptions.value))
	{
		obj.descriptions.value = "";
		obj.descriptions.style.background="#d00000";
		obj.businessName.style.background="";
		obj.descriptions.focus();
		return false;
	} // end
	
	return true;
}				 


function validateTargetaudc(obj)
{
	if(trim(obj.industry.value))
	{
		obj.industry.value = "";
		obj.industry.style.background="#d00000";
		obj.targetAudience.style.background="";
		obj.firstThing.style.background="";
		obj.secondThing.style.background="";
		obj.thirdThing.style.background="";
		obj.industry.focus();
		return false;
	
	}
	
	if(trim(obj.targetAudience.value))
	{
		obj.targetAudience.value = "";
		obj.targetAudience.style.background="#d00000";
		obj.industry.style.background="";
		obj.firstThing.style.background="";
		obj.secondThing.style.background="";
		obj.thirdThing.style.background="";
		obj.targetAudience.focus();
		return false;
	}


	if(trim(obj.firstThing.value))
	{
		obj.firstThing.value = "";
		obj.firstThing.style.background="#d00000";
		obj.industry.style.background="";
		obj.targetAudience.style.background="";
		obj.secondThing.style.background="";
		obj.thirdThing.style.background="";
		obj.firstThing.focus();
		return false;
	}


	if(trim(obj.secondThing.value))
	{
		obj.secondThing.value = "";
		obj.secondThing.style.background="#d00000";
		obj.industry.style.background="";
		obj.targetAudience.style.background="";
		obj.firstThing.style.background="";
		obj.thirdThing.style.background="";
		obj.secondThing.focus();
		return false;
	}


	if(trim(obj.thirdThing.value))
	{
		obj.thirdThing.value = "";
		obj.thirdThing.style.background="#d00000";
		obj.industry.style.background="";
		obj.targetAudience.style.background="";
		obj.firstThing.style.background="";
		obj.secondThing.style.background="";
		obj.thirdThing.focus();
		return false;
	}
	
	return true;
}


function validateConcept(obj)
{
	if(trim(obj.textColour.value))
	{
		obj.textColour.value = "";
		obj.textColour.style.background="#d00000";
		obj.contestLength.style.background="";
		obj.prizeAmount.style.background="";
		obj.textColour.focus();
		return false;
	
	}
	
	if(trim(obj.contestLength.value))
	{
		obj.contestLength.value = "";
		obj.contestLength.style.background="#d00000";
		obj.textColour.style.background="";
		obj.prizeAmount.style.background="";
		obj.contestLength.focus();
		return false;
	}


	if(trim(obj.prizeAmount.value))
	{
		obj.prizeAmount.value = "";
		obj.prizeAmount.style.background="#d00000";
		obj.textColour.style.background="";
		obj.contestLength.style.background="";
		obj.prizeAmount.focus();
		return false;
	}	 
	
	return true;
}


function validateLogin(obj)
{
	if(trim(obj.userName.value))
	{
		obj.userName.value = "";
		obj.userName.style.background="#d00000";
		obj.password.style.background="";
		//alert("Please Enter Bussiness Name.");
		obj.userName.focus();
		return false;
	
	}
	
	if(trim(obj.password.value))
	{
		obj.password.value = "";
		obj.password.style.background="#d00000";
		obj.userName.style.background="";
		obj.password.focus();
		return false;
	}
	
	return true;
		 
}


function validateSignup(obj)
{
	if(trim(obj.emailId.value))
	{
		obj.emailId.value = "";
		obj.emailId.style.background="#d00000";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		//alert("Please Enter Bussiness Name.");
		obj.emailId.focus();
		return false;
	
	}
	
	if(trim(obj.userName.value))
	{
		obj.userName.value = "";
		obj.userName.style.background="#d00000";
		obj.emailId.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		obj.userName.focus();
		return false;
	}


	if(trim(obj.bussinessName.value))
	{
		obj.bussinessName.value = "";
		obj.bussinessName.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		obj.bussinessName.focus();
		return false;
	}


	if(trim(obj.password.value))
	{
		obj.password.value = "";
		obj.password.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		obj.password.focus();
		return false;
	}


	if(trim(obj.confirmPassword.value))
	{
		obj.confirmPassword.value = "";
		obj.confirmPassword.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.country.style.background="";
		obj.confirmPassword.focus();
		return false;
	}


	if(trim(obj.country.value))
	{
		obj.country.value = "";
		obj.country.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.focus();
		return false;
	}


	if(trim(obj.paypalEmail.value))
	{
		obj.paypalEmail.value = "";
		obj.paypalEmail.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		obj.confirmPaypalEmail.style.background="";
		obj.paypalEmail.focus();
		return false;
	} 


	if(trim(obj.confirmPaypalEmail.value))
	{
		obj.confirmPaypalEmail.value = "";
		obj.confirmPaypalEmail.style.background="#d00000";
		obj.emailId.style.background="";
		obj.userName.style.background="";
		obj.bussinessName.style.background="";
		obj.password.style.background="";
		obj.confirmPassword.style.background="";
		obj.country.style.background="";
		obj.paypalEmail.style.background="";
		obj.confirmPaypalEmail.focus();
		return false;
	} 

	return true;
}


function validateForgotpassword(obj)
{
	if(trim(obj.forgotEmail.value))
	{
		obj.forgotEmail.value = "";
		obj.forgotEmail.style.background="#d00000";
		obj.forgotEmail.focus();
		return false;
	}	 
	
	return true;
}


function validateContactus(obj)
{
	if(trim(obj.contactName.value))
	{
		obj.contactName.value = "";
		obj.contactName.style.background="#d00000";
		obj.contactEmail.style.background="";
		obj.subject.style.background="";
		obj.contactMessage.style.background="";
		obj.contactName.focus();
		return false;
	
	}
	
	if(trim(obj.contactEmail.value))
	{
		obj.contactEmail.value = "";
		obj.contactEmail.style.background="#d00000";
		obj.contactName.style.background="";
		obj.subject.style.background="";
		obj.contactMessage.style.background="";
		obj.contactEmail.focus();
		return false;
	}


	if(trim(obj.subject.value))
	{
		obj.subject.value = "";
		obj.subject.style.background="#d00000";
		obj.contactName.style.background="";
		obj.contactEmail.style.background="";
		obj.contactMessage.style.background="";
		obj.subject.focus();
		return false;
	}


	if(trim(obj.contactMessage.value))
	{
		obj.contactMessage.value = "";
		obj.contactMessage.style.background="#d00000";
		obj.contactName.style.background="";
		obj.contactEmail.style.background="";
		obj.subject.style.background="";
		obj.contactMessage.focus();
		return false;
	}
	
	return true;

}

function trim(par)
{
	var y = par.length;
	var ret = '';
	var ex=0;
	var bl=0;
	for (i=0;i<y;i++)
	{
		if (par.charAt(i) == ' ')
			bl = bl+1
		else
		{
			ret=ret+par.charAt(i);
			ex = ex+1
		}
	}

	if(par == ' ')
		return true;
	else if (bl==y)
		return true;
	else 
		return false;
}
 
//ajax function.....load contest entries..contest page
function ajax_displayContestEntries(contestId, pageLimit)
{
	if (contestId > 0) {
		sortField = document.sortEntries.sortField.value;
		xajax_displayContestEntries(contestId, sortField, pageLimit);
	}
}

//ajax function.....load contest entries..rank page
function ajax_rankContestEntries(contestId,pageLimit)
{
	if (contestId > 0) 
		xajax_rankContestEntries(contestId,pageLimit);
}

//ajax function.....rank this entry
function rankIt(entryId, contestId, designerId) 
{
	/*
	divHeight = document.getElementById("logoEntries").offsetHeight;	
	divWidth = document.getElementById("logoEntries").offsetWidth;	
	document.getElementById("screenLayer").style.height = divHeight+"px";	
	document.getElementById("screenLayer").style.width = divWidth+"px";	
	document.getElementById("screenLayer").style.display = 'block';
	*/
	
	lRank = "sisnolabs"+entryId;
	rankLabel = document.getElementById(entryId)[document.getElementById(entryId).selectedIndex].innerHTML;
	document.getElementById(lRank).innerHTML = "Client Rank : "+rankLabel;
	
	//document.getElementById("logoEntries").style.display = 'none';
	rankOption = document.getElementById(entryId).value;
	xajax_rankIt(entryId, contestId, designerId, rankOption);
	
	pageLimit = document.getElementById('pageLimit').value;
	//setTimeout("xajax_rankContestEntries("+contestId+","+pageLimit+")",100);	
}
//ajax function.....list my entries
function ajax_myEntries(pageLimit) 
{
	sortField = document.entriesForm.myEntries.value;
	contestId = document.entriesForm.myContests.value;	
	xajax_myEntries(sortField,pageLimit,contestId);
}
//withdraw entry
function ajax_withdrawEntry(entryId,logoImage,logoPath,entryOrder,contestId)
{
	if (confirm("Are you sure, you want to withdraw your entry?")) {
		xajax_withdrawOneEntry(entryId,logoImage,logoPath,entryOrder,contestId);
		xajax_myEntries("rank");
	}
}

//entires for particular contest by a designer
function ajax_contestEntriesByDesigner(did,cid, pageLimit)
{
	xajax_contestEntriesByDesigner(did,cid,pageLimit);
}
//all entires by a designer
function ajax_allEntriesByDesigner(did,pageLimit)
{
	sortType = document.designerPortfolio.sortEntries.value;
	sortIndustry = document.designerPortfolio.industry.value;
	xajax_allEntriesByDesigner(did,sortType,sortIndustry,pageLimit);
}
//display portfolio
function ajax_displayPortfolio(pageLimit)
{
	selectedIndustry = document.portfolio.industry.value;
	xajax_displayPortfolio(selectedIndustry,pageLimit);
}
//display portfolio on index page
function ajax_displayWonLogos(totalLogo)
{
	xajax_displayWonLogos(totalLogo);
}
//add comment by logged in member
function ajax_addContestComment()
{
	contestId = document.contestViewForm.contestId.value;
	comment = document.contestViewForm.comment.value;
	if (contestId > 0 && comment != "") {
		xajax_addContestComment(contestId,comment);
	}
}

<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

//var message="Function Disabled!";
function clickIE4()
{
	if (event.button==2){
		return false;
	}
}

function clickNS4(e)
{
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			return false;
		}
	}
}

function checkNum(obj,feesContest) 
{

	var constPrice = obj;

	if (isNaN(obj.value)) {
			alert('Please enter numeric values');
			obj.value = '';
			return false;
	}
	
	if (obj.value.length > 4 && obj.value < 200) {
			
			obj.value = '';
			return false;
	}

	if (obj.value > 1000) {
			obj.value = '';
			return false;
	}

	var calFees = (obj.value*feesContest)/100;
	document.getElementById('amountAfterTax').innerHTML = calFees;
	document.getElementById('totAmount').innerHTML =  Number(constPrice.value) + Number(calFees);
	document.frmStartalogo.taxAmount.value = calFees;
	document.frmStartalogo.totPrizeAmount.value =  Number(constPrice.value) + Number(calFees);
	
	if(document.frmStartalogo.isPrivate.checked == true) {
		document.getElementById('totAmount').innerHTML =  Number(constPrice.value) + Number(calFees)+50;
		document.frmStartalogo.totPrizeAmount.value =  Number(constPrice.value) + Number(calFees)+50;
	}

	return true;
}


function addPrivate() 
{
	
	if (document.frmStartalogo.isPrivate.checked == true) {
		document.getElementById('privateAmount').innerHTML = 50.00;
		document.getElementById('totAmount').innerHTML = (Number(document.frmStartalogo.prizeAmount.value) + Number(document.getElementById('amountAfterTax').innerHTML)) + 50;
	
	} else {
	
		document.getElementById('privateAmount').innerHTML = 0.00;
		document.getElementById('totAmount').innerHTML = (Number(document.frmStartalogo.prizeAmount.value) + Number(document.getElementById('amountAfterTax').innerHTML));

	}	
}


//report spam message by members 
function ajax_reportSpamMessage(messageId)
{
	msgData = document.frmSpam.spamMessage.value;
	xajax_reportSpamMessage(messageId,msgData);	
}

function ajax_sendPMMessage(receiverId,entryorder)
{
	var4 = "privateMessage_"+entryorder;
	msgData = document.getElementById(var4).value;
	xajax_sendPMMessage(receiverId,msgData,entryorder);	
}

function showNtLogMsg()
{
	document.getElementById('infoText').innerHTML = "Please Login To Send \n Private Message";
	document.getElementById('infoBox').style.display = 'block';
}

function showNtFollMsg()
{
	document.getElementById('infoText').innerHTML = "Please Login To Follow \n This Designer";
	document.getElementById('infoBox').style.display = 'block';

}

function hideNtLogMsg()
{
	document.getElementById('infoBox').style.display = 'none';
}

function showSendActBlk()
{
	document.getElementById('actMailBox').style.display = 'block';
}

function hideACTBlk()
{
	document.getElementById('actMailBox').style.display = 'none';
}

function comfirmReport(comId,tabName)
{
	if(confirm("Are you sure you want to report this comment?")){
		xajax_commentReport(comId,tabName);
	}
}

function ajax_sendReport(contestId,eorder)
{
	msg = "report"+eorder;
	msgData = document.getElementById(msg).value;

	if(contestId > 0 && eorder > 0 && msgData != "" && msgData != "Enter Text Here"){
		xajax_sendReport(contestId,eorder,msgData);
	}
}

function ajax_remove(imageNumber)
{
	if(imageNumber > 0){
		xajax_removeImage(imageNumber);
	}
}

function ajax_sendPostReport(pId,tId,pedId)
{
	msg = "report"+pId;
	msgData = document.getElementById(msg).value;
	
	if(pId > 0 && tId > 0 && pedId > 0 && msgData != "" && msgData != "Enter Text Here"){
		
		xajax_sendCommentReport(pId,tId,msgData,pedId);
	}
}

function ajax_sendContestCommentReport(commentId,contestId)
{
	msg = "report"+commentId;
	msgData = document.getElementById(msg).value;
	
	if(commentId > 0 && contestId > 0 && msgData != "" && msgData != "Enter Text Here"){

		xajax_sendContestCommentReport(commentId,contestId,msgData);
	}
}

function ajax_sendDiscussionCommentReport(commentId,contestId,uId)
{
	msg = "report"+commentId;
	msgData = document.getElementById(msg).value;
	
	if(commentId > 0 && contestId > 0 && uId > 0 && msgData != "" && msgData != "Enter Text Here"){

		xajax_sendDiscussionCommentReport(commentId,contestId,msgData,uId);
	}
}

function ajax_sendDisputeCommentReport(caseComId,caseId,contestId)
{
	msg = "report"+caseComId;
	msgData = document.getElementById(msg).value;
	
	if(caseComId > 0 && caseId > 0 && contestId > 0 && msgData != "" && msgData != "Enter Text Here"){

		xajax_sendDisputeCommentReport(caseComId,caseId,contestId,msgData);
	}
	
}

function selectToWithdraw(obj,entryId)
{
	eData = document.getElementById('widthrawEntries').value;
	if (eData == "") {
		document.getElementById('widthrawEntries').value = entryId;	
	} else {
		
		if(obj.checked == true) {
			document.getElementById('widthrawEntries').value = eData+"|"+entryId;	
		} else {
			var str = document.getElementById('widthrawEntries').value;
			strnew = str.replace(entryId, "");
			document.getElementById('widthrawEntries').value = strnew;
		}	
	}
}
function ajax_withdrawEntry2()
{
	if (confirm("Are you sure you want to withdraw multiple logos?")) {
		sentries = document.getElementById('widthrawEntries').value;
		xajax_withdrawEntry(sentries);
		setTimeout("ajax_myEntries(1)",300);	
	}
}