function openPopUpImage(url,w,h){
	 var iwidth=w, iheight=h;
	 {
		popUpWin=window.open(url,'img','marginwidth=0,marginheight=0,leftmargin=0,topmargin=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+(iwidth)+',height='+(iheight));
	 }
}
function openPopUpZoom(url,w,h){
	 var iwidth=w, iheight=h;
	 {
		popUpWin=window.open(url,'img','marginwidth=0,marginheight=0,leftmargin=0,topmargin=0,toolbar=0,location=0,directories=0,status=0,menubars=0,scrollbars=0,resizable=0,width='+(iwidth)+',height='+(iheight));
	 }
}


function reapply()
{
setTimeout("slideit()",100)//pauza initiala, in care e afisata poza din <img src=.....>
return true
}
window.onerror=reapply


var speed=3//pauzele dintre poze : 1=mica
var step=1
var whichimage=1//incepe cu prima din lista de imagini, dupa ce o afiseaza pe cea din <img src=.....>

function slideit()
{
if (!document.images)
return
if (document.all)
slide.filters.blendTrans.apply()
document.images.slide.src=eval("image"+step+".src")
if (document.all)
slide.filters.blendTrans.play()
whichimage=step
if (step<number_of_images)
step++
else
step=1
if (document.all)
setTimeout("slideit()",speed*1000+3000)
else
setTimeout("slideit()",speed*1000)
}

//textarea limitat:
//<!-- Original:  Ronnie T. Moore -->
//<!-- Web Site:  The JavaScript Source -->
//<!-- Dynamic 'fix' by: Nannette Thacker -->
//<!-- Web Site: http://www.shiningstar.net -->
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
	field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
	countfield.value = maxlimit - field.value.length;
}

//numai cifre:
	function digONLY(obj) {
		obj.value=obj.value.replace(/\D/g,'')
	}
//==============================================================ALT
tags=new Array(
	'a',
	'img'
	);
 border_color='#000000';
 bg_color='white';
 text_color='#336699';
 font='verdana';
 text_size='10';
 opacity='90';

d=document;
document.write('<div id="info_link" style="padding:1 3;position:absolute;border:1px solid '+border_color+';border-width: 1 1 1 1;background:'+bg_color+';font:bold '+text_size+'px '+font+';color:'+text_color+';display:none;width:150;z-index:1000;filter:alpha(opacity='+opacity+')"></div>')
document.onmousemove=move;
document.onmouseout="info('','off')"
function info(tip,optiune){
b=document.getElementById('info_link')
if (optiune=='on'){
b.style.display="block";
b.innerHTML=tip;
}
if (optiune=='off'){b.style.display="none";b.innerHTML=''}
}
function move(){
b=document.getElementById('info_link')
if(event.clientX<d.body.clientWidth-120)
	{b.style.left=event.x+9+d.body.scrollLeft;}
else	{b.style.left=event.x-108+d.body.scrollLeft;}

if(event.clientY>d.body.clientHeight-50)
	{b.style.top=event.y-19+d.body.scrollTop;}
else	{b.style.top=event.y+19+d.body.scrollTop;}
}
//INFO LINK ONMOUSEOVER
function over(){
for(k=0;k<tags.length;k++){
 obj=d.getElementsByTagName(tags[k])
 for(i=0;i<obj.length;i++){
 	if(obj[i].getAttribute('info')){
	obj[i].onmouseover = function(){info(this.getAttribute('info'),'on')};
	obj[i].onmouseout = function(){info('','off')};
	}}
}
};onload=over
//INFO DEVINE ALT

function ifConfirmRedirect(textConfirm, urlRedirect){
	if(confirm(textConfirm)){
		eval("window.location='"+urlRedirect+"'");
	}else
		return;
}

//collection of functions => hidden div to display big thumbs 
//mouse position - a part of layer with big pic onclick
function getMouseCoords(){
	var e = window.event;
	xMousePos = 0;
	yMousePos = 0;
	// Netscape
    if (document.layers) {
        xMousePos = e.pageX;
        yMousePos = e.pageY;
	// Internet Explorer
    } else if (document.all) {
        xMousePos = e.x+document.body.scrollLeft;
        yMousePos = e.y+document.body.scrollTop;
	// Netcsape 6
    } else if (document.getElementById) {
        xMousePos = 130 + window.scrollX;
        //yMousePos = event.pageY;
        yMousePos = 130 + window.scrollY;
    }
    mouseCoords = new Array (xMousePos, yMousePos);
    return mouseCoords;
}
//
function isNumber(a) {
    return typeof a == 'number' && isFinite(a);
}

//picture layer functions
function layerObject(thisId,left,top) {
	this.obj = document.getElementById(thisId);
	this.obj.style.left = left;
	this.obj.style.top = top;
	return this.obj;
}

function show(picLayerId, picHeight) {
	//hide first
	floatLyr = new layerObject(picLayerId, -1300, 0);
	//test if in frame
	var test_frame=document.location+"";
	var test2=test_frame.indexOf("_iframe");
	if(test2>=0){
		x_left=10;
		y_top=20;
	}else{
		var browserName=navigator.appName;
		if(browserName=="Microsoft Internet Explorer"){
			var coords=mouse_pos();
			x_left=coords[0];
			//y_top=(coords[1]-picHeightHalf);
			y_top=Math.round(coords[1]-(picHeight/2));
	
			//window.status="x: "+x_left+"y: "+y_top+" picH: "+picHeight;
			if(!isNumber(x_left) || x_left<1)
			//if(!(typeof x_left =='number') || x_left<1)
				x_left=400;
			if(!isNumber(y_top) || y_top<1)
				y_top=300;
		}else{
			var coords= new Array(200, 200);
			x_left=coords[0];
			y_top=Math.round(coords[1]-picHeight/2);
			if(y_top<60)
				y_top=60;
		}
	}
	floatLyr = new layerObject(picLayerId, x_left, y_top);
}

function show_2(picLayerId, picLayerWidth, picLayerHeight){
	obj = document.getElementById(picLayerId);
	coord = getMouseCoords();
	var windowX = document.body.clientWidth;
	var windowY = document.body.clientHeight;
	//alert(picLayerWidth+' '+picLayerHeight)
	//keep floating layer inside window :)
	if((coord[0]+picLayerWidth) > windowX)
		coord[0] = windowX-picLayerWidth;
	if((coord[1]+picLayerHeight) > windowY)
		coord[1] = windowY-picLayerHeight;
	//finnally bring floating layer into the visible part
	obj.style.left = coord[0];
	obj.style.top = coord[1];
}
function hide(picLayerId) {
	obj = document.getElementById(picLayerId);
	coord = getMouseCoords();
	obj.style.left = -1000;
	obj.style.top = -1000;
}
//end layer
//end collection of functions