﻿$(document).ready(function(){
    if (pfConfigurator) runPf('AnimatedPictureFrame', pfConfigurator);

    if (typeof Cufon != "undefined") {
        Cufon.now();
        Cufon.replace('.contentStyleHead', { fontFamily: 'Square721 BT' });     
    }
});

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){
		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;
	}	
}




