/**
 * main site functionality
 */
 function load(theIdx) {
	try {
		var path = theImgDir; var inHTML = '';
		if ( (typeof theElm=='undefiend' ) || (typeof theGallery=='undefined') ) { alert('Undefined start,end block or Gallery div!'); }
		if ( (typeof theSubImgDirs[theIdx]=='undefined') || theData[theIdx].length==0 ) { return setComingSoon(path+'/'); }
		path += '/'+theSubImgDirs[theIdx]+'/';
		for ( var i=0; i<theData[theIdx].length; i++) {
			//var tmpImg = new Image(); //attempt to force the browser download 
			if ( theData[theIdx][i] )  {
				inHTML+=theElm.replace(/%%(\w+)%%/gi,
					function($0,$1) { switch ($1) { case 'ref' : return theIdx; default : return path + theData[theIdx][i][$1]; }} );
			}
		}
		theGallery.innerHTML = inHTML;
	} catch(e) { alert(e); }
	initLightbox();
	if ((version >= 5.5) && (document.body.filters)) { setPNG(); }
 }
 function setComingSoon(path) {
 	theGallery.innerHTML = '<img class="comming" src="'+path+theComSoon+'">';
 	if ((version >= 5.5) && (document.body.filters)) { setPNG(); }
 }
  function setContact() {
 	theGallery.innerHTML = '<div class="contact"><br/><A HREF="mailto: mnikoloff@gmail.com">mnikoloff@gmail.com</A><br/><br/>\
 	<img src="images/icq_logo.png">&nbsp;267731153<br/>\
 	<img class="photo" src="images/contact_picture.png"></div>';
 	if ((version >= 5.5) && (document.body.filters)) { setPNG(); }
 }
 var objMyImg = null;
 window.onload = function () { load('illustration'); };
 var arVersion = navigator.appVersion.split("MSIE");
 var version = parseFloat(arVersion[1]);
 if ((version >= 5.5) && (document.body.filters)) { setPNG(); }
 else { document.getElementById('main').style.backgroundImage='images/frame.png'; }
