/*function show( element ){
	//alert(document.getElementById( element ));
	if( el= document.getElementById( element ) ) el.style.display = "block";
}
*/

/*
function hide( element ){
	if( el= document.getElementById( element ) ) el.style.display = "none";
}
*/

var new_img_id	= 1;
function add_img() {
 	if(document.getElementsByName('del_file[]'))
		uploade_img_count = document.getElementsByName('del_file[]').length;
	if(new_img_id < (5-parseInt(uploade_img_count))) {
		document.getElementById('file_upload_img'+new_img_id).innerHTML='<input type="file" name="inputfiles[]" class="form" style="width: 550px;" size="29" onchange="add_img()">';
		new_img_id++;
	}
}

function add_img_photogallery() {
 	if(new_img_id < 5 ) {
		document.getElementById('file_upload_img'+new_img_id).innerHTML='<input type="file" name="inputfiles[]" class="form" style="width: 550px;" size="29" onchange="add_img_photogallery()">';
		new_img_id++;
	}
}

var new_img_id	= 1;
function add_img_map() {
	if(new_img_id < 1) {
		document.getElementById('file_upload_img_map'+new_img_id).innerHTML='<input type="file" name="inputfiles_map[]" class="form" style="width: 550px;" size="29" onchange="add_img_map()">';
		new_img_id++;
	}
}

tr = new Object();
//tr.pressCtlD = "Press ctrl+d or choose bookmarks/add from your browsers menu";
tr.url = parent.document.location;

function bookmark (url, description){
	if(window.external) 
		window.external.AddFavorite(url,description);
	else 
		alert (tr.pressCtlD);
}

function printDoc() {
	if(window.print)
		window.print();
	else 
		alert (tr.pressCltP);
}

/*function showFrameContainer (el, container, frame, url, href, width, height, xOffset, yOffset, busyUrl){
	if (document.getElementById){
		var e = document.getElementById(el);
		var c = document.getElementById(container);
		var f = document.getElementById(frame);
		if (c.style.display == "block"){
			c.style.display="none";
			return false;
		}
		if (f.src != url) 
			f.src = url + '?container=' + container + '&frame=' + frame + '&href=' + href;
			
		var l=0; var t=0;
		aTag = e;
		do {
			aTag = aTag.offsetParent;
			l += aTag.offsetLeft;
			t += aTag.offsetTop;
		} while (aTag.offsetParent && aTag.tagName != 'BODY');
		var left =  e.offsetLeft + l;
		if (xOffset) left += xOffset;
		var top = e.offsetTop + t

		if (yOffset) 
			top += yOffset;

		if (!width) 
			width = parseInt(c.style.width);
		
		if (width && ( (left + width) > getBrowserWidth() )) 
			left = getBrowserWidth() - width - 100;

		if (left < 0) 
			left = 0;

		c.style.left = "30%";//left+'px';
		c.style.top = top+100+'px';
		c.style.display="block";
		return false;
	} else {
		window.open(url);
	}
}*/
/*
function hideFrameContainer(container, frame, busyUrl){
    if (document.getElementById){
        var c=document.getElementById(container);
        var f=document.getElementById(frame);
        c.style.display="none";
    }
}*/
/*
function getBrowserWidth(){
  var w = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    w = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    w = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    w = document.body.clientWidth;
  }
  return w;
}*/
