function ViewHidden(StyleID, StyleView, StyleHidden) {
	message = document.getElementById(StyleID);
	if (message.className != StyleView){
		message.className = StyleView;
	}else{
		message.className = StyleHidden;
	}
}
function ChangeClass(StyleID, StyleClass) {
	message = document.getElementById(StyleID);
	message.className = StyleClass;
}



/*********************************************************/
/* Created by Jimmy (jimmy@dp.ru)                        */
/* Copyright Fakir™                                      */
/*********************************************************/
function fcmShowModal(strPagePath, intWidth, intHeight, stScroll, stResize, strWinName) {
  var scroll = stScroll;
  var resize = stResize;

  if ( strWinName == '' )
    strWinName = 'fcmModal';

  if ( resize == '' )
    resize = 'yes';

  var top=0, left=0;
  if(intWidth > screen.width-10 || intHeight > screen.height-28) {
    scroll = 'yes';
  }

  if(intHeight < screen.height-28)
    top = Math.floor((screen.height - intHeight)/2-14);

  if(intWidth < screen.width-10)
    left = Math.floor((screen.width - intWidth)/2);

  intWidth = Math.min(intWidth, screen.width-10);
  intHeight = Math.min(intHeight, screen.height-28);
  window.open(strPagePath, strWinName, 'menubar=no, scrollbars='+scroll+', resizable='+resize+', width='+intWidth+', height='+intHeight+', left='+left+', top='+top+', directories=no, location=no, toolbar=no');
}
/*****/
