function check_software_login()
{
	if(document.getElementById("username").value.trim() == "")
	{
		alert("Please enter username");
		document.getElementById("username").focus();
		return false;
	}//if
	if(document.getElementById("password").value.trim() == "")
	{
		alert("Please enter password");
		document.getElementById("password").focus();
		return false;
	}//if	
}//check_review_login

function check_software_step1()
{
	if(document.getElementById("LicenseType1").checked == false && document.getElementById("LicenseType2").checked == false && document.getElementById("LicenseType3").checked == false)
	{
      	alert('Please select license type');
		document.getElementById("LicenseType1").focus();
		return false;
		
	}
	if(get_softwareChkCount('ProductCompatibility')== 0)
	{
      	alert('Please select atleast one product compatibility');
		return false;
	}
	if(get_softwareChkCount('software_category') == 0 )
	{
      	alert('Please select atleast one category');
		return false;
	}
	if(get_softwareChkCount('software_category') > 2)
	{
      	alert("Please select maximum of 2 categorires");
		return false;
	}
}//check_review_step1

function get_softwareChkCount(txt)	
{
	f1 = document.software_step1;
	var cnt=0;
	for(i=0;i< f1.length;i++)
	{
		var x=f1[i].name;
		
		if( x.indexOf(txt) >=0  &&  f1[i].type=='checkbox'  && f1[i].checked==true)
				cnt++;
	}	
	return cnt;
}//get_reviewChkCount

function ShowOtherProductCompatibility()
{
	if(document.getElementById("other").checked == true)	
		document.getElementById("OtherProductCompatibility").style.display="";
	else
		document.getElementById("OtherProductCompatibility").style.display="none";
}


function check_software_step2(frm)
{
	if(document.getElementById("ProductName").value.trim() == "")
	{
		alert("Please enter product name");
		document.getElementById("ProductName").focus();
		return false;
	}//if
	if(document.getElementById("Version").value.trim() == "")
	{
		alert("Please enter product version");
		document.getElementById("Version").focus();
		return false;
	}//if
	if(document.getElementById("ProductDescription").value.trim() == "")
	{
		alert("Please enter brief product description");
		document.getElementById("ProductDescription").focus();
		return false;
	}//if
	if(document.getElementById("CompanyName").value.trim() == "")
	{
		alert("Please enter company name");
		document.getElementById("CompanyName").focus();
		return false;
	}//if
	if(document.getElementById("CompanyUrl").value.trim() == "")
	{
		alert("Please enter company website or product URL");
		document.getElementById("CompanyUrl").focus();
		return false;
	}//
	if(document.getElementById("CompanyUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("CompanyUrl").value) == false)
		{
			alert("Please enter valid company website or product URL");
			document.getElementById("CompanyUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("DownloadUrl").value.trim() == "")
	{
		alert("Please enter download URL");
		document.getElementById("DownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("DownloadUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("DownloadUrl").value) == false)
		{
			alert("Please enter valid download URL");
			document.getElementById("DownloadUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("RetypeDownloadUrl").value.trim() == "")
	{
		alert("Please retype download URL");
		document.getElementById("RetypeDownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("RetypeDownloadUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("RetypeDownloadUrl").value) == false)
		{
			alert("Please retype valid download URL");
			document.getElementById("RetypeDownloadUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("DownloadUrl").value != document.getElementById("RetypeDownloadUrl").value)
	{
		alert("Download URL and retype download URL should be same");
		document.getElementById("RetypeDownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("DownLoadSize").value.trim() == "")
	{
		alert("Please enter download file size");
		document.getElementById("DownLoadSize").focus();
		return false;
	}//if
	if(document.getElementById("DownLoadSize").value.trim() != "")
	{
		if(checknumber(document.getElementById("DownLoadSize").value) == false)	
		{
			alert("Please enter valid download file size");
			document.getElementById("DownLoadSize").focus();
			return false;
		}
	}//if
	if(document.getElementById("LicenseType").value.trim() == "Freeware" && document.getElementById("Price").value.trim() != "")
	{
		if(document.getElementById("Price").value.trim() != "0")
		{
			alert("You selected Freeware for this product upload. This means your product should be free. If your software is not free, return to the previous page and select the appropriate software license type.");
			document.getElementById("Price").focus();
			return false;
		}
	}//if
	if(document.getElementById("Price").value.trim() != "")
	{
		if(checknumber(document.getElementById("Price").value) == false)	
		{
			alert("Please enter valid price");
			document.getElementById("Price").focus();
			return false;
		}
	}//if
	if(CheckOsRequirements() > 0)
	{
		alert("Please enter OS requirements");
		document.getElementById("OsRequirements_0").focus();
		return false;
	}//if
	if(document.getElementById("Description").value.trim() == "")
	{
		alert("Please enter description");
		document.getElementById("Description").focus();
		return false;
	}//if
/*	if(CheckNewVersionFeature() > 0)
	{
		alert("Please enter new version features");
		document.getElementById("NewVersionFeature_0").focus();
		return false;
	}//if*/
	if(get_softwareValidFile("software_img") > 0)
	{
		alert("Please upload valid software image(s)");
		return false;
	}//if
/*	if(document.getElementById("reply_email").value.trim() != "" && document.getElementById("re_reply_email").value.trim() == "")
	{
		alert("Please retype reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("reply_email").value.trim() == "" && document.getElementById("re_reply_email").value.trim() != "")
	{
		alert("Please enter reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("reply_email").value.trim() != "" && emailCheck(document.getElementById("reply_email").value) == false)
	{
		alert("Please enter valid reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("re_reply_email").value.trim() != "" && emailCheck(document.getElementById("re_reply_email").value) == false)
	{
		alert("Please enter valid reply email id");
		document.getElementById("re_reply_email").focus();
		return false;
	}//if
	if(document.getElementById("reply_email").value.trim() != "" && document.getElementById("re_reply_email").value.trim() != "")
	{
		if(document.getElementById("reply_email").value.trim() != document.getElementById("re_reply_email").value.trim())
		{
			alert("Reply email id and retype reply email id should be same");
			document.getElementById("reply_email").focus();
			return false;
		}
	}//if
	*/
	if(document.getElementById("HelpingHand").checked == true)
	{
		if(document.getElementById("HelpingWebAddress").value.trim() == "")
		{
			alert("Please enter website address");
			document.getElementById("HelpingWebAddress").focus();
			return false;
		}//
		if(document.getElementById("HelpingWebAddress").value.trim() != "")
		{
			if(isValidURL(document.getElementById("HelpingWebAddress").value) == false)
			{
				alert("Please enter valid website address");
				document.getElementById("HelpingWebAddress").focus();
				return false;
			}//if
		}//
	}//if
	
	document.getElementById("Post").disabled='true';
	hidden_span = document.getElementById('hide_stuff');
	hidden_span.style.display = 'block';
	return true;		
}//check_review_step2()


function get_softwareValidFile(txt)	
{
	f1 = document.software_step2;
	var cnt=0;
	for(i=0;i< f1.length;i++)
	{
		var x=f1[i].name;		
		if( x.indexOf(txt) >=0  &&  f1[i].type=='file'  && f1[i].value.trim()!="" && LimitAttach1(f1[i].value)==false)
				cnt++;
	}	
	return cnt;
}//get_reviewChkCount

function CheckOsRequirements()	
{
	var num_OsRequirements = document.getElementById("num_OsRequirements").value;	
	var cnt=0;
	for(j=0;j<num_OsRequirements;j++)
	{	
		txt = "OsRequirements_"+j;
		
		cnt = cnt + ValidateOsRequirements(txt);
	}	
	if(cnt < num_OsRequirements)
		cnt = 0;
	return cnt;
}//get_reviewChkCount

function ValidateOsRequirements(txt)	
{
	f1 = document.software_step2;
	var cnt=0;

	for(i=0;i< f1.length;i++)
	{
		var x=f1[i].name;

		if( x.indexOf(txt) >=0  &&  f1[i].type=='text'  && f1[i].value.trim() =="")
			cnt++;
	}
	return cnt;
}//get_reviewChkCount

function CheckNewVersionFeature()	
{
	var num_NewVersionFeature = document.getElementById("num_NewVersionFeature").value;	
	var cnt=0;
	for(j=0;j<num_NewVersionFeature;j++)
	{	
		txt = "NewVersionFeature_"+j;
		
		cnt = cnt + ValidateNewVersionFeature(txt);
	}	
	
	if(cnt < num_NewVersionFeature)
		cnt = 0;
	
	return cnt;
}//get_reviewChkCount

function ValidateNewVersionFeature(txt)	
{
	f1 = document.software_step2;
	var cnt=0;

	for(i=0;i< f1.length;i++)
	{
		var x=f1[i].name;
			if( x.indexOf(txt) >=0  &&  f1[i].type=='text'  && f1[i].value.trim() =="")
					cnt++;
	}
	return cnt;
}//get_reviewChkCount

function addSoftwareImage()
{
	var mainDiv=document.getElementById('div_images');
	var num = document.software_step2.num_images.value;
  	document.software_step2.num_images.value = num;
	if(num <= 10)
	{
		var newDiv = document.createElement('div');
		var divName = 'div_images_'+ num;
		newDiv.setAttribute('id',divName);
		newDiv.setAttribute('style','padding-top:10px;');
		newDiv.innerHTML ="<table width='100%' border='0' cellspacing='2' cellpadding='2'><tr><td align='right' valign='top' width='15%'>Image title:&nbsp;</td><td align='left' valign='top'><input name='ImageTitle_"+num+"' id='ImageTitle_"+num+"' type='text' size='60' value='' onKeyDown='CountLeft(this.form.ImageTitle_"+num+",this.form.ImageTitle_"+num+"Cnt,50);'  onKeyUp='CountLeft(this.form.ImageTitle_1,this.form.ImageTitle_"+num+"Cnt,50);'></td></tr><tr><td align='right' valign='top'>&nbsp;</td><td align='left' valign='top'>Characters Remaining: <input name='ImageTitle_"+num+"Cnt' type='text' class='search_box2' size='4' maxlength='4' value='50' readonly=''></td></tr><tr><td align='right' valign='top' width='15%'>Image description:&nbsp;										</td><td align='left' valign='top'><input name='ImageDescription_"+num+"' id='ImageDescription_"+num+"' type='text' size='60' value='' onKeyDown='CountLeft(this.form.ImageDescription_"+num+",this.form.ImageDescription_"+num+"Cnt,300);'  onKeyUp='CountLeft(this.form.ImageDescription_"+num+",this.form.ImageDescription_"+num+"Cnt,300);'></td></tr><tr><td align='right' valign='top'>&nbsp;</td><td align='left' valign='top'>Characters Remaining: <input name='ImageDescription_"+num+"Cnt' type='text' class='search_box2' size='4' maxlength='4' value='300' readonly=''></td></tr><tr><td align='right' valign='top'>&nbsp;</td><td align='left' valign='top'><input type='file' id='software_img[]' name='software_img[]'>&nbsp;&nbsp; <a href='javascript:deleteSoftwareImage("+ num +")' class='blue_link'>Remove</a></td></tr></table>";
		mainDiv.appendChild(newDiv); 
	}
}

function deleteSoftwareImage(divId) 
{
	var mainDiv=document.getElementById('div_images');
	var num = document.software_step2.num_images.value;
  	var childDiv = document.getElementById('div_images_'+ divId);
  	mainDiv.removeChild(childDiv);
  	document.software_step2.num_images.value = num-1;
}

function addOsRequirements()
{
	var mainDiv=document.getElementById('div_OsRequirements');
	var num = (document.software_step2.num_OsRequirements.value - 1)+ 2;
  	document.software_step2.num_OsRequirements.value = num;
	if(num <= 5)
	{
		var newDiv = document.createElement('div');
		var divName = 'div_OsRequirements_'+ num;
		newDiv.setAttribute('id',divName);
		newDiv.setAttribute('style','padding-top:10px;');
		newDiv.innerHTML ="<table width='100%'  border='0' cellspacing='2' cellpadding='2'><tr><td align='left' valign='top' class='font12'><input name='OsRequirements_"+num+"' id='OsRequirements_"+num+"' type='text' size='60'  onKeyDown='CountLeft(this.form.OsRequirements_"+num+",this.form.OsRequirements_"+num+"Cnt,100);'  onKeyUp='CountLeft(this.form.OsRequirements_"+num+",this.form.OsRequirements_"+num+"Cnt,100);'>&nbsp;&nbsp; <a href='javascript:deleteOsRequirements("+ num +")' class='blue_link'>Remove</a></td></tr><tr><td align='left' valign='top' class='font12'>Characters Remaining: <input name='OsRequirements_"+num+"Cnt' type='text' class='search_box2' size='4' maxlength='4' value='100' readonly=''></td></tr></table>";
		mainDiv.appendChild(newDiv); 
	}
}
function deleteOsRequirements(divId) 
{
	var mainDiv=document.getElementById('div_OsRequirements');
	var num = document.software_step2.num_OsRequirements.value;
  	var childDiv = document.getElementById('div_OsRequirements_'+ divId);
  	mainDiv.removeChild(childDiv);
  	document.software_step2.num_OsRequirements.value = num-1;
}

function addNewVersionFeature()
{
	var mainDiv=document.getElementById('div_NewVersionFeature');
	var num = (document.software_step2.num_NewVersionFeature.value - 1)+ 2;
  	document.software_step2.num_NewVersionFeature.value = num;
	if(num <= 5)
	{
		var newDiv = document.createElement('div');
		var divName = 'div_NewVersionFeature_'+ num;
		newDiv.setAttribute('id',divName);
		newDiv.setAttribute('style','padding-top:10px;');
		newDiv.innerHTML ="<table width='100%'  border='0' cellspacing='2' cellpadding='2'><tr><td align='left' valign='top' class='font12'><input name='NewVersionFeature_"+num+"' id='NewVersionFeature_"+num+"' type='text' size='60'  onKeyDown='CountLeft(this.form.NewVersionFeature_"+num+",this.form.NewVersionFeature_"+num+"Cnt,60);'  onKeyUp='CountLeft(this.form.NewVersionFeature_"+num+",this.form.NewVersionFeature_"+num+"Cnt,60);'>&nbsp;&nbsp; <a href='javascript:deleteNewVersionFeature("+ num +")' class='blue_link'>Remove</a></td></tr><tr><td align='left' valign='top' class='font12'>Characters Remaining: <input name='NewVersionFeature_"+num+"Cnt' type='text' class='search_box2' size='4' maxlength='4' value='60' readonly=''></td></tr></table>";
		mainDiv.appendChild(newDiv); 
	}
}

function deleteNewVersionFeature(divId) 
{
	var mainDiv=document.getElementById('div_NewVersionFeature');
	var num = document.software_step2.num_NewVersionFeature.value;
  	var childDiv = document.getElementById('div_NewVersionFeature_'+divId);
  	mainDiv.removeChild(childDiv);
  	document.software_step2.num_NewVersionFeature.value = num-1;
}

function redirect_editSoftware_post(software_id)
{
	var next ="com_software_post|step3";		
	window.location.href = "http://www.macdirectory.com/component/option,com_software3/task,editSoftware/software_id,"+software_id+"/next,"+next+"/";
}


function checknumber(x)
{
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	
	if (anum.test(x))
		testresult=true
	else
	{
		testresult=false
	}
	return (testresult)
}


function ListCategorySoftwares()
{
	var category = document.getElementById("category").value;
	
	if(category == "all")
		window.location.href = "http://www.macdirectory.com/component/option,com_software/task,viewAll/";
	else
		window.location.href = "http://www.macdirectory.com/component/option,com_software1/task,SearchCategory/Category,"+category+"/";
		
}//

function check_SoftwareReply()
{
	if(document.getElementById("sen_name").value.trim() == "")
	{
		alert("Please enter your name");
		document.getElementById("sen_name").focus();
		return false;
	}//if
	if(document.getElementById("sen_email").value.trim() == "")
	{
		alert("Please enter your email");
		document.getElementById("sen_email").focus();
		return false;
	}//if
	if(document.getElementById("sen_email").value.trim() != "")
	{
		if(emailCheck(document.getElementById("sen_email").value) == false)
		{
			alert("Please enter valid your email");
			document.getElementById("sen_email").focus();
			return false;
		}
	}//if
	if(document.getElementById("message").value.trim() == "")
	{
		alert("Please enter message");
		document.getElementById("message").focus();
		return false;
	}//if

}//check_SoftwareReply


function ViewRelatedDownload()
{
	document.getElementById("RelatedDownloadDiv").style.display="";	
	document.getElementById("TopDownloadDiv").style.display="none";	
	document.getElementById("RelatedReviewsDiv").style.display="none";	
	
	document.getElementById("RelatedDownloadLink").className = "tab_links";
	document.getElementById("TopDownloadLink").className = "tab_links1";
	document.getElementById("ReviewsLink").className = "tab_links1";
	
	document.getElementById("MoreRelatedLink").style.display="";
	document.getElementById("MoreTopLink").style.display="none";
	document.getElementById("MoreReviewsLink").style.display="none";

	document.getElementById("RelatedDownloadImgUp").style.display="none";
	document.getElementById("RelatedDownloadImgDown").style.display="";
	document.getElementById("TopDownloadsImgUp").style.display="";
	document.getElementById("TopDownloadsImgDown").style.display="none";
	document.getElementById("RelatedReviewsImgUp").style.display="";
	document.getElementById("RelatedReviewsImgDown").style.display="none";
}//ViewRelatedNews

function ViewTopDownloads()
{
	document.getElementById("RelatedDownloadDiv").style.display="none";	
	document.getElementById("TopDownloadDiv").style.display="";	
	document.getElementById("RelatedReviewsDiv").style.display="none";	
	
	document.getElementById("RelatedDownloadLink").className = "tab_links1";
	document.getElementById("TopDownloadLink").className = "tab_links";
	document.getElementById("ReviewsLink").className = "tab_links1";
	
	document.getElementById("MoreRelatedLink").style.display="none";
	document.getElementById("MoreTopLink").style.display="";
	document.getElementById("MoreReviewsLink").style.display="none";

	document.getElementById("RelatedDownloadImgUp").style.display="";
	document.getElementById("RelatedDownloadImgDown").style.display="none";
	document.getElementById("TopDownloadsImgUp").style.display="none";
	document.getElementById("TopDownloadsImgDown").style.display="";
	document.getElementById("RelatedReviewsImgUp").style.display="";
	document.getElementById("RelatedReviewsImgDown").style.display="none";
}//ViewTopReadNews

function ViewSoftwareRelatedReviews()
{
	document.getElementById("RelatedDownloadDiv").style.display="none";	
	document.getElementById("TopDownloadDiv").style.display="none";	
	document.getElementById("RelatedReviewsDiv").style.display="";	
	
	document.getElementById("RelatedDownloadLink").className = "tab_links1";
	document.getElementById("TopDownloadLink").className = "tab_links1";
	document.getElementById("ReviewsLink").className = "tab_links";

	document.getElementById("MoreRelatedLink").style.display="none";
	document.getElementById("MoreTopLink").style.display="none";
	document.getElementById("MoreReviewsLink").style.display="";

	document.getElementById("RelatedDownloadImgUp").style.display="";
	document.getElementById("RelatedDownloadImgDown").style.display="none";
	document.getElementById("TopDownloadsImgUp").style.display="";
	document.getElementById("TopDownloadsImgDown").style.display="none";
	document.getElementById("RelatedReviewsImgUp").style.display="none";
	document.getElementById("RelatedReviewsImgDown").style.display="";
}//ViewExclusiveNews

function get_EditSoftwareChkCount(txt)	
{
	f1 = document.software_step2;
	var cnt=0;
	for(i=0;i< f1.length;i++)
	{
		var x=f1[i].name;
		
		if( x.indexOf(txt) >=0  &&  f1[i].type=='checkbox'  && f1[i].checked==true)
				cnt++;
	}	
	return cnt;
}//get_reviewChkCount


function check_software_edit(frm)
{
	if(document.getElementById("LicenseType1").checked == false && document.getElementById("LicenseType2").checked == false && document.getElementById("LicenseType3").checked == false)
	{
      	alert('Please select license type');
		document.getElementById("LicenseType1").focus();
		return false;
		
	}
	if(document.getElementById("ProductCompatibility1").checked == false && document.getElementById("ProductCompatibility2").checked == false && document.getElementById("ProductCompatibility3").checked == false && document.getElementById("ProductCompatibility4").checked == false)
	{
      	alert('Please select product compatibility');
		document.getElementById("ProductCompatibility1").focus();
		return false;
		
	}
	if(get_EditSoftwareChkCount('software_category') == 0 )
	{
      	alert('Please select atleast one category');
		return false;
	}
	if(get_EditSoftwareChkCount('software_category') > 2)
	{
      	alert("Please select maximum of 2 categorires");
		return false;
	}
	if(document.getElementById("ProductName").value.trim() == "")
	{
		alert("Please enter product name");
		document.getElementById("ProductName").focus();
		return false;
	}//if
	if(document.getElementById("Version").value.trim() == "")
	{
		alert("Please enter product version");
		document.getElementById("Version").focus();
		return false;
	}//if
	if(document.getElementById("ProductDescription").value.trim() == "")
	{
		alert("Please enter brief product description");
		document.getElementById("ProductDescription").focus();
		return false;
	}//if
	if(document.getElementById("CompanyName").value.trim() == "")
	{
		alert("Please enter company name");
		document.getElementById("CompanyName").focus();
		return false;
	}//if
	if(document.getElementById("CompanyUrl").value.trim() == "")
	{
		alert("Please enter company website or product URL");
		document.getElementById("CompanyUrl").focus();
		return false;
	}//
	if(document.getElementById("CompanyUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("CompanyUrl").value) == false)
		{
			alert("Please enter valid company website or product URL");
			document.getElementById("CompanyUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("DownloadUrl").value.trim() == "")
	{
		alert("Please enter download URL");
		document.getElementById("DownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("DownloadUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("DownloadUrl").value) == false)
		{
			alert("Please enter valid download URL");
			document.getElementById("DownloadUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("RetypeDownloadUrl").value.trim() == "")
	{
		alert("Please retype download URL");
		document.getElementById("RetypeDownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("RetypeDownloadUrl").value.trim() != "")
	{
		if(isValidURL(document.getElementById("RetypeDownloadUrl").value) == false)
		{
			alert("Please retype valid download URL");
			document.getElementById("RetypeDownloadUrl").focus();
			return false;
		}//if
	}//
	if(document.getElementById("DownloadUrl").value != document.getElementById("RetypeDownloadUrl").value)
	{
		alert("Download URL and retype download URL should be same");
		document.getElementById("RetypeDownloadUrl").focus();
		return false;
	}//
	if(document.getElementById("DownLoadSize").value.trim() == "")
	{
		alert("Please enter download file size");
		document.getElementById("DownLoadSize").focus();
		return false;
	}//if
	if(document.getElementById("DownLoadSize").value.trim() != "")
	{
		if(checknumber(document.getElementById("DownLoadSize").value) == false)	
		{
			alert("Please enter valid download file size");
			document.getElementById("DownLoadSize").focus();
			return false;
		}
	}//if
	if(CheckOsRequirements() > 0)
	{
		alert("Please enter OS requirements");
		document.getElementById("OsRequirements_0").focus();
		return false;
	}//if
	if(document.getElementById("Description").value.trim() == "")
	{
		alert("Please enter description");
		document.getElementById("Description").focus();
		return false;
	}//if
/*	if(CheckNewVersionFeature() > 0)
	{
		alert("Please enter new version features");
		document.getElementById("NewVersionFeature_0").focus();
		return false;
	}//if*/
	if(get_softwareValidFile("software_img") > 0)
	{
		alert("Please upload valid software image(s)");
		return false;
	}//if
/*	if(document.getElementById("reply_email").value.trim() != "" && document.getElementById("re_reply_email").value.trim() == "")
	{
		alert("Please retype reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("reply_email").value.trim() == "" && document.getElementById("re_reply_email").value.trim() != "")
	{
		alert("Please enter reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("reply_email").value.trim() != "" && emailCheck(document.getElementById("reply_email").value) == false)
	{
		alert("Please enter valid reply email id");
		document.getElementById("reply_email").focus();
		return false;
	}//if

	if(document.getElementById("re_reply_email").value.trim() != "" && emailCheck(document.getElementById("re_reply_email").value) == false)
	{
		alert("Please enter valid reply email id");
		document.getElementById("re_reply_email").focus();
		return false;
	}//if
	if(document.getElementById("reply_email").value.trim() != "" && document.getElementById("re_reply_email").value.trim() != "")
	{
		if(document.getElementById("reply_email").value.trim() != document.getElementById("re_reply_email").value.trim())
		{
			alert("Reply email id and retype reply email id should be same");
			document.getElementById("reply_email").focus();
			return false;
		}
	}//if
	*/
	if(document.getElementById("HelpingHand").checked == true)
	{
		if(document.getElementById("HelpingWebAddress").value.trim() == "")
		{
			alert("Please enter website address");
			document.getElementById("HelpingWebAddress").focus();
			return false;
		}//
		if(document.getElementById("HelpingWebAddress").value.trim() != "")
		{
			if(isValidURL(document.getElementById("HelpingWebAddress").value) == false)
			{
				alert("Please enter valid website address");
				document.getElementById("HelpingWebAddress").focus();
				return false;
			}//if
		}//
	}//if
	
	document.getElementById("Post").disabled='true';
	hidden_span = document.getElementById('hide_stuff');
	hidden_span.style.display = 'block';
	return true;		
}//check_review_step2()

function ViewSoftwareImage1()
{
	document.getElementById("DeleteImageLink1").style.display = "";
}//ViewSoftwareImage1

function DeleteSoftwareImage1()
{
	document.getElementById("DeleteImageLink1").style.display = "none";
	document.getElementById("ImageDescription_0").value = "";
	document.getElementById("ImageTitle_0").value = "";
	document.getElementById("software_img_0").value = "";
}//DeleteSoftwareImage1

function ViewSoftwareImage2()
{
	document.getElementById("DeleteImageLink2").style.display = "";
}//ViewSoftwareImage1

function DeleteSoftwareImage2()
{
	document.getElementById("DeleteImageLink2").style.display = "none";
	document.getElementById("ImageDescription_1").value = "";
	document.getElementById("ImageTitle_1").value = "";
	document.getElementById("software_img_1").value = "";
}//DeleteSoftwareImage1

function ViewSoftwareVideo()
{
	document.getElementById("DeleteVideoLink").style.display = "";
}//ViewSoftwareImage1

function DeleteSoftwareVideo()
{
	document.getElementById("DeleteVideoLink").style.display = "none";
	document.getElementById("VideoDescription").value = "";
	document.getElementById("VideoTitle").value = "";
	document.getElementById("software_Video").value = "";
}//DeleteSoftwareImage1