function wSize() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth; myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;
	}
		return(myWidth);
}
		 
function rSize(){
var w = 0;
var modx = 0;
w = wSize();
if ( w > 960 ) {
modx = (w-960) / 2;
} else {
modx = 0;
}
return(modx);	 
}

function reSize(elem,val){
var w = 0;
var v = 0;
var rez = 0;
w = rSize();
v = val + w;
document.getElementById(elem).style.left = v+"px";
}




//functiile pt mouse-over

function swapimgrestore() { // pune imaginea lveche
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadimages() { // incarca imaginile
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length; for(i=0; i<arguments.length; i++)
    if (arguments[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=arguments[i];}}
}

function findobj(n, d) { // cauta obiectul
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findobj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapimage() { // schimba imaginea
  var i,j=0,x; document.MM_sr=new Array; for(i=0;i<(arguments.length-2);i+=3)
   if ((x=findobj(arguments[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=arguments[i+2];}
}


 
