﻿function runPf(name, conf){
	try{
		if (document.getElementsByName(name).length>1){
			/* Give  params to embed for FF */
			document.getElementsByName(name)[1].init(conf);
		}else{
			/* Give  params to object for IE */
			document.getElementsByName(name)[0].init(conf);
		}
	}
	catch(e){
		var time =  conf.delay;
		var step =  conf.speedOfAnimation*50;
		setTimeout(function(){$('#FixPF').animate({ opacity: "hide" }, step )}, time-400);
		setTimeout(function(){runPf(name, conf)}, 200);
	}
}


function openDialog(params)
{
	params = params||{};

	
	var dialog = window.showModalDialog('/dialogs/commonPopupWindow.html',
		params, 'center:yes; dialogHeight:550px;resizable:yes;dialogWidth:550px ')

	if(params.answer.resCode == 'OK')
	{
		return params.answer;
	}	
}

	



