﻿function GetGlobalNumber(NumberStr,DecimalSymbol,DigitGroupingSymbol) {
	return parseFloat((NumberStr+'').replace(DigitGroupingSymbol,'').replace(DecimalSymbol,'.'));
}

function load(o,programTitle,programPath)
			{
				var query = window.location.search.substring(1);
				var baglac = "?";
				if (programPath.indexOf("?") != -1) {
					baglac = "&";
				}
				frmPlatform.location.href = programPath + baglac + query
									
			}
function About()
			{
				OpenWin('/BM.ERP.Siparis/about.aspx',460,300,'AboutBox')
			}
	
function OpenWin(url,w,h,name)
			{
				var ozellik;
				
				var top = (screen.height - h)/2 - 40;
				var left = (screen.width - w)/2; 
				if(top < 0) top = 0; 
				if(left < 0) left = 0; 
				
				/*var top = 0;
				var left = 0;*/
				ozellik = 'top=' + top + ',left=' +left; 
				ozellik += ',height=' + h + ',width=' + w + ',resizable=yes,scrollbars=1'; 
				window.open(url, name, ozellik); 	
			}
			
		function OpenFullWin(url,w,h,name)
			{
				var ozellik;
				/*
				var top = (screen.height - h)/2 - 40;
				var left = (screen.width - w)/2; 
				if(top < 0) top = 0; 
				if(left < 0) left = 0; 
				*/
				var top = 0;
				var left = 0;
				//ozellik = 'top=' + top + ',left=' +left; 
				//ozellik += ',height=' + h + ',width=' + w + ',resizable=yes,scrollbars=1,fullscreen=3,top=0,left=0,width=400,height=200,scroll=NO,'; 
				ozellik = 'top=0,left=0,width=400,height=200,scroll=NO,fullscreen=1'; 
				window.open(url, name, ozellik); 	
			}
			
function BackRefresh(kapat) { 
    window.opener.location.href = window.opener.location.href;
	if (window.opener.progressWindow) 
		{ 
		window.opener.progressWindow.close();
		} 
	if (kapat == "True") 
		{
		window.close();
		}
} 

function openStdWin(sPath, sName, iX, iY)
{
	if (!iX) iX = 750;
	if (!iY) iY = 510;
	try
	{
		window.open(sPath, sName, "width=" + iX + ",height=" + iY + ",status=1,resizable=1");
	}
	catch(e) {}
}
function openStdDlg(sPath, oArgs, iX, iY)
{
	return window.showModalDialog(sPath, oArgs, "dialogWidth:" + iX + "px;dialogHeight:" + iY + "px;help:0;status:0;scroll:1;center:1");
}

////////////// F.G  ////////
	
function openStdPopUp(PopUpTitle, PopUpPath, iX, iY){
	ShowLoadPic('pass')	
	openStdDlg("PopUpLoader.aspx?PopUpTitle=" + PopUpTitle + "&PopUpPath=" + PopUpPath , document.getElementById('pic_load') , iX, iY)
	//openStdWin("PopUpLoader.aspx?PopUpTitle=" + PopUpTitle + "&PopUpPath=" + PopUpPath,null, iX, iY)
}

function ShowLoadPic(param){
	if(event.returnValue==true || param=='pass'){
		if(document.getElementById('pic_load')!=null){
			document.getElementById('pic_load').style.visibility = 'visible';
			pic_w =document.getElementById('pic_load').width;
			pic_h =document.getElementById('pic_load').height;
			t = document.body.scrollTop;
			l = document.body.clientWidth;
			h = document.body.clientHeight;
			document.getElementById('pic_load').style.top = (h/2)-(pic_h/2) + t - 15;
			document.getElementById('pic_load').style.left = (l/2)-(pic_w/2)-15;
		}
	}
}

////////////////////////////
