//var uri = '' + new String (Math.random()).substring (2, 11);
//document.write('<img src="'+uri +'" height="0" width="0" boder="0">');

function IsEULAAccepted(file) {
	var bIsEULAAccepted = false;
	
	try {
		var sFeatures = "dialogWidth:530px;dialogHeight:430px;center:yes;edge:raised;help:no;resizable:no;scroll:no;status:no;unadorned:yes";
		var retValue = window.showModalDialog("http://www.friend.fr/friend/accept_licence.php?app="+file, "", sFeatures);
		bIsEULAAccepted = (retValue == true) ? true:false;
	}
	catch (e) {
	
	}
	return bIsEULAAccepted;
}

function downloadNow(file,redUrl) {

	//document.frmCtrl.btnGo.disabled = true;
	
	//var bIsInitialScan = true;
	var bIsEULAAccepted = IsEULAAccepted(file);
	
	if ( bIsEULAAccepted == true ) {
			
		//var sFeatures = "dialogWidth:530px;dialogHeight:450px;center:yes;edge:raised;help:no;resizable:no;scroll:no;status:no;unadorned:yes";
		 //window.showModalDialog("../../application/Install-exe/FR-DIS/Friend.exe", "", sFeatures);
		 //downloadNow('../../application/Install-exe/FR-DIS/Friend.exe','');
		window.focus();	
	    location.href = redUrl + '?idl=n';
	}/*
	else {
		document.frmCtrl.btnGo.disabled = false;
	}*/

	return;
}
