function display_settings()
{
	check_session();
	tab_flag='1';
	var temp ="";
	disableall();
	
	
	var url = "ajaxfiles/settings.php";
		//alert(url);
		//window.location = url;
		//return true;
		var isWorking = false;
		if (!isWorking)
		{
				isWorking = true;
				if (window.XMLHttpRequest)
			  	{
					http_display_setting=new XMLHttpRequest();
			  		http_display_setting.open("GET",url, true);
				  	http_display_setting.onreadystatechange=handleHttpResponsedisplaySetting;
				  	http_display_setting.send(null);
			  	}
				// code for IE
				else if (window.ActiveXObject)
			  	{
			  		http_display_setting=new ActiveXObject("Microsoft.XMLHTTP");
			    	if (http_display_setting)
			    	{
			    		http_display_setting.open("GET",url, true);
			    		http_display_setting.onreadystatechange=handleHttpResponsedisplaySetting;
			    		http_display_setting.send();
			    	}
			  	}
		   return false;
	  	}
}
function handleHttpResponsedisplaySetting()
{
	
	if (http_display_setting.readyState == 4)
	{
			//alert(http_display_setting.responseText);
			var xmlDocument = http_display_setting.responseXML;
			var msg = xmlDocument.getElementsByTagName('msg').item(0).firstChild.data;
			var PrifxId = xmlDocument.getElementsByTagName('PrifxId').item(0).firstChild.data;
			var DpiId = xmlDocument.getElementsByTagName('DpiId').item(0).firstChild.data;
			var QualityId = xmlDocument.getElementsByTagName('QualityId').item(0).firstChild.data;
			var PLimitId = xmlDocument.getElementsByTagName('PLimitId').item(0).firstChild.data;
			var RLimitId = xmlDocument.getElementsByTagName('RLimitId').item(0).firstChild.data;
			var MFileLimit = xmlDocument.getElementsByTagName('MFileLimit').item(0).firstChild.data;
			
			//call_errmsg(msg);
			var temp='';
		temp+='<div style="border:solid 0px;">';
			
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">Dots Per Inches </div>';
				temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:30px;float:left;"><input type="Text" id="DpiId" value="'+DpiId+'" class="plainInput"></div>';
			temp+='</div>';
			temp+='<div style="clear:both;"></div>';
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">Quality</div>';
				temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:30px;float:left;"><input class="plainInput" id="QualityId" value="'+QualityId+'" type="Text" ></div>';
			temp+='</div>';
			temp+='<div  style="clear:both;"></div>';
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">Prefix</div>';
				temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:30px;float:left;"><input class="plainInput" type="Text" value="'+PrifxId+'" id="PrifxId" ></div>';
			temp+='</div>';
			temp+='<div style="clear:both;"></div>';
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">Page Limit</div>';
				temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:30px;float:left;"><input class="plainInput" type="Text" value="'+PLimitId+'" id="PLimitId" ></div>';
			temp+='</div>';
			temp+='<div style="clear:both;"></div>';
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">Thumbnails Per Page</div>';
				temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:30px;float:left;"><input type="Text" class="plainInput" value="'+RLimitId+'" id="RLimitId" ></div>';
			temp+='</div>';
			temp+='<div style="clear:both;"></div>';
			temp+='<div class="input_box" style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				//temp+='<div style=" width:150px; float:left;" align="right">Maximum Size of File for upload</div>';
				//temp+='<div style=" width:10px;float:left;" align="center" >:</div>';
				temp+='<div style=" width:180px; float:left; text-align:left;"><input type="hidden" readonly="true" class="plainInput"  id="MFileLimit" > </div>';// value="'+MFileLimit+'"
			temp+='</div>';
			temp+='<div style="clear:both;"></div>';
			temp+='<div style="border:solid 0px; width:100%">';
				temp+='<div width="10%" style="border:solid 0px; width:100px; float:left;">&nbsp;</div>';
				temp+='<div style=" width:150px; float:left;" align="right">&nbsp;</div>';
				temp+='<div style=" width:10px;float:left;" align="center" >&nbsp;</div>';
				temp+='<div style=" width:200px;float:left;border:solid 0px;" align="left"><img src="'+js_site_images+'btn-submit.gif" style="cursor:pointer;" onclick="settings();" name="btnsubmit"/>&nbsp;';
				temp+='<img src="'+js_site_images+'btn-cancel.gif" style="cursor:pointer;" onclick="back_to_home();" name="btncancel" id="btncancel"/></div>';
				
				//temp+='<div style=" width:200px;float:left;border:solid 0px;" align="left"><input type="button" value="Submit" class="button" onclick="settings();">&nbsp;<input type="button" value="Cancel" onclick="back_to_home()" class="button" ></div>';
			temp+='</div>';
		temp+='</div>';
		//alert(temp);
		document.getElementById('test').innerHTML = temp;		
		activeImage = new Array();		
	}
	else
	{
		temp='<table class=listing-border" width="100%" height="250" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td align="center"><img src="'+js_site_images+'loading-Animation.gif"/></td></tr></table>';		
		document.getElementById('test').innerHTML=temp;
	}

}
