// JavaScript Document

var site_url = '/blinds/testing/';
/*var html = '<div id="uploadDiv" class="light-box"><div class="top-row"><p class="curve-left"></p><p class="curve-right"></p></div><div class="content"><img src="'+site_url+'images/loader.gif" alt"Loading Image" width="150" /><p><BR />Image uploading, please wait.....</p></div><div class="down-row"><p class="curve-left"></p><p class="curve-right"></p></div></div><div id="fade" class="black-overlay" ></div>';
document.write(html);
document.getElementById('uploadDiv').style.display='none';
document.getElementById('fade').style.display='none';*/

//////FUNCTION TO VALIDATE UPLOAD OWN IMAGES /////////
function validateOwnImage()
{
	var frm = document.form_digitalblinds;
	if(GenValidation(frm.user_imgname,'Your Image Name','','') == 0)
	{
		alert('Please enter Your Image Name');
		return false;
	}
	else if(GenValidation(frm.own_image,'Your Image','','') == 0)
	{
		alert('Please enter Your Image');
		return false;	
	}
	else
	{
		document.getElementById('alertMessage').style.display='block';
		document.getElementById('fade').style.display='block';
		//document.getElementById('uploadDiv').style.display='block';
		//document.getElementById('fade').style.display='block';
		setTimeout('submitForm()',1000);
	}
}

function submitForm() {
	document.getElementById('hide_submitImage').value = 1;
	document.form_digitalblinds.submit();	
}
