// JavaScript Document by Quang Mai Duy | quangmd@g3ws.com

function getsearch() {
	alert("hello");
}

function includejs(jsfile) {
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ('/lib/javascript/' + jsfile);
   document.write ("'><" + "/script>");
}
		
window.dhx_globalImgPath="/images/";	

includejs('jsadditional.js');
includejs('mycookie.js');
includejs('system.js');
includejs('swapstyle.js');
includejs('myloader.js');

includejs('myphoto.js');

/*includejs('dhtmlXCommon.js');
includejs('dhtmlXCombo.js');
includejs('dhtmlXCombo_extra.js');*/

includejs('window/prototype.js');
includejs('window/effects.js');
includejs('window/window.js');
includejs('window/debug.js');

includejs('jscalendar/calendar.js');
includejs('jscalendar/calendar-setup.js');
includejs('jscalendar/calendar-en.js');


	
// simplePreload( '01.gif', '02.gif' ); 
function preloadImages()
{ 
  var args = preloadImages.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

preloadImages("/images/loading.gif","/style/themes/default/center_left.gif","/style/themes/default/bottom_left.gif","/style/themes/default/bottom_mid.gif","/style/themes/default/bottom_right.gif","/style/themes/default/bottom_right_resize.gif","/style/themes/default/center_left.gif","/style/themes/default/center_right.gif","/style/themes/default/close.gif","/style/themes/default/clear.gif","/style/themes/default/inspect.gif","/style/themes/default/maximize.gif","/style/themes/default/overlay.png","/style/themes/default/minimize.gif","/style/themes/default/resize.gif","/style/themes/default/sizer.gif","/style/themes/default/top_left.gif","/style/themes/default/top_mid.gif","/style/themes/default/top_right.gif");

function iresize(frameid, minheight, maxheight){

	var fr=document.getElementById(frameid);

	fr.height = 5;
	
	if (fr && !window.opera){

		if (fr.contentDocument && fr.contentDocument.body.offsetHeight) //ns6 syntax
			fr.height = fr.contentDocument.body.offsetHeight+45;
		else if (fr.document && fr.document.body.scrollHeight) //ie5+ syntax
			fr.height = fr.Document.body.scrollHeight + 5;

		if (minheight && (minheight > fr.height)) {
			fr.height = minheight + 'px';
		}
		if (maxheight && (maxheight < fr.height)) {
			fr.height = maxheight + 'px';
		}
	}		
}

function expand(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuHover";
  d.className = "menuHover";
}

function collapse(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuNormal";
  d.className = "menuNormal";
}
		
//preloadImages("");