/*****************************************

* Dissolving Image Rollover- By Roy Whittle (http://www.javascript-fx.com/)

* Featured on/available at http://www.dynamicdrive.com/

* This notice must stay intact for use

*****************************************/

/*

//Generate transition CSS (transition=0 to 23)

document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.4,transition=' + parseInt(Math.random() * 23) + ');border: 1px solid #6899CA;}</STYLE>');



//Uncomment the next line for fading rollovers instead of dissolving:

//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.4) }</STYLE>');



var onImages=new Array();

function Rollover(imgName, imgSrc)

{

	onImages[imgName] = new Image();

	onImages[imgName].src = imgSrc;

}



function turnOn(imgName){ 

	if(document.images[imgName].filters != null)

		document.images[imgName].filters[0].apply();

	document.images[imgName].offSrc = document.images[imgName].src;

	document.images[imgName].src    = onImages[imgName].src;

	if(document.images[imgName].filters != null)

		document.images[imgName].filters[0].play();

}



function turnOff(imgName){ 

	if(document.images[imgName].filters != null)

		document.images[imgName].filters[0].stop();

	document.images[imgName].src = document.images[imgName].offSrc;

}

*/



function viewPic(img)

{ 	    

picfile = new Image();     

picfile.src =(img);     

fileCheck(img); 

}



function fileCheck(img)

{ 	    

if( (picfile.width!=0) && (picfile.height!=0) )    

	{ 

        makeWindow(img); 

    }    

else     

	{

        funzione="fileCheck('"+img+"')"; 

        intervallo=setTimeout(funzione,10); 

    }

}



function makeWindow(img)

{ 	
/*

	 if (window.screen) 

	 {

		 var reducepcg;

		 var ht100 = ht + 100;

		

		 if (ht100 > screen.availHeight)

		 {

			 reducepcg =(1-((ht100 - screen.availHeight) / ht100)); 

			 ht = ht * reducepcg

			 wd = wd * reducepcg

		 }

		 var wd100 = wd + 100;

		 if (wd100 > screen.availWidth)

		 {

			 reducepcg =(1-((wd100 - screen.availWidth) / wd100)); 

			 ht = ht * reducepcg

			 wd = wd * reducepcg

		 }

	 }

*/

	var reduce = 30;
	

	ht = picfile.height;
    wd = picfile.width;
	

	var args;
	var thescr = 0;
	
	
	
	

    if (window.screen) 
    { 

        var avht = screen.availHeight-(reduce*2); 
        var avwd = screen.availWidth-(reduce*2);

        var xcen = (avwd - wd) / 2; 
        var ycen = (avht - ht) / 2;

		xcen = xcen+reduce;
		ycen = ycen+reduce;

		if (wd > avwd)
		{
			xcen = reduce;
			thescr = 1;
			ht = ht+17;
			
		}
			
		if (ht > avht)
		{	
			ycen = reduce;
			thescr = 1;
			wd = wd+17;
		}
		
		if (ht > avht)
		args= "height=" + avht + ",innerHeight=" + avht ;
	else
		args= "height=" + ht + ",innerHeight=" + ht ;
		
	if (wd > avwd)	
		args += ",width=" + avwd + ",innerWidth=" + avwd ;
	else
    	args += ",width=" + wd + ",innerWidth=" + wd ;
		
        args += ",left=" + xcen + ",screenX=" + xcen;
		ycen = ycen - 18;
        args += ",top=" + ycen + ",screenY=" + ycen + ",resizable=no"; 	
			
    }
	
	


	popwin=window.open("","_blank",args)

	//popwin=window.open("","_blank","height=" + hta + ",innerHeight=" + hta + ",width=" + wda + ",innerWidth=" + wda + ",left=ycen,top=0,resizable=no")

	popwin.document.open()

	//popwin.document.write('<html><head><title>'+img+'</title></head><body bgcolor=white scroll=yes topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginheight=0 marginwidth=0><div style="position: absolute; top:0px;left:0px"><a href="javascript:window.close()"><img src="'+img+'" width="'+wd+'" height="'+ht+'" border="0"></a></div></body></html>')

	popwin.document.write('<html><head><title>&#28687;&#35261;&#22294;&#29255;</title><link href="../web/css.css" rel="stylesheet" type="text/css"></head><body bgcolor=white ') 
	if (thescr==1)
	popwin.document.write('scroll=yes ')
	else
	popwin.document.write('scroll=no ')
	
	popwin.document.write('topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginheight=0 marginwidth=0><div style="position: absolute; top:0px;left:0px"><a href="javascript:window.close()"><img src="'+img+'" border="0"></a></div></body></html>')

	popwin.document.close()

}



function high(which2){

theobject=which2

highlighting=setInterval("highlightit(theobject)",50)

}

function low(which2){

clearInterval(highlighting)

if (which2.style.MozOpacity)

which2.style.MozOpacity=0.3

else if (which2.filters)

which2.filters.alpha.opacity=60

}



function highlightit(cur2){

if (cur2.style.MozOpacity<1)

cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1

else if (cur2.filters&&cur2.filters.alpha.opacity<100)

cur2.filters.alpha.opacity+=10

else if (window.highlighting)

clearInterval(highlighting)

}









  // All you have to do is put another text in the variable message.

  // Don't forget to break all lines with a ^

  // When you do not place a ^ at the end of all the message, the

  // message will not repeat



  scrollSpeed = 25

  lineDelay   = 1500



  // Do not change the text below //



  txt         = ""



  function scrollText(pos) {

    if (message.charAt(pos) != '^') {

      txt    = txt + message.charAt(pos)

      status = txt

      pauze  = scrollSpeed

    }

    else {

      pauze = lineDelay

      txt   = ""

      if (pos == message.length-1) pos = -1

    }

    pos++

    setTimeout("scrollText('"+pos+"')",pauze)

  }

  



function MM_swapImgRestore() { //v3.0

  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 MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.01

  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=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->



function toggle(n) {

 if( document.getElementById(n).style.display=='none' ){

   document.getElementById(n).style.display = '';

 }else{

   document.getElementById(n).style.display = 'none';

 }

}



function fnToggle2() {

    oTransContainer2.filters[0].enabled = true;

    oTransContainer2.filters[0].Apply();

	var y = totNum2;

	while (y > 0)

   {

  		if (y == curNum2)

		{

			switch (y) 

			{

				case 1: 

  				oDIV21.style.visibility="visible";

  				break

				case 2: 

 			 	oDIV22.style.visibility="visible";

  				break

				case 3: 

  				oDIV23.style.visibility="visible";

  				break

				case 4: 

 			 	oDIV24.style.visibility="visible";

  				break

				case 5: 

  				oDIV25.style.visibility="visible";

  				break

				case 6: 

 			 	oDIV26.style.visibility="visible";

  				break

				case 7: 

  				oDIV27.style.visibility="visible";

  				break

				case 8: 

 			 	oDIV28.style.visibility="visible";

  				break

				case 9: 

  				oDIV29.style.visibility="visible";

  				break

				case 10: 

 			 	oDIV210.style.visibility="visible";

  				break

			}

		}

		else

		{

			switch (y) 

			{

				case 1: 

  				oDIV21.style.visibility="hidden";

  				break

				case 2: 

 			 	oDIV22.style.visibility="hidden";

  				break

				case 3: 

  				oDIV23.style.visibility="hidden";

  				break

				case 4: 

 			 	oDIV24.style.visibility="hidden";

  				break

				case 5: 

  				oDIV25.style.visibility="hidden";

  				break

				case 6: 

 			 	oDIV26.style.visibility="hidden";

  				break

				case 7: 

  				oDIV27.style.visibility="hidden";

  				break

				case 8: 

 			 	oDIV28.style.visibility="hidden";

  				break

				case 9: 

  				oDIV29.style.visibility="hidden";

  				break

				case 10: 

 			 	oDIV210.style.visibility="hidden";

  				break

			}

		}

		y--;

   }

if (curNum2==totNum2) 

	curNum2 = 1;

else

  	curNum2++;



    oTransContainer2.filters[0].Play();

}



function fnToggle() {

    oTransContainer.filters[0].enabled = true;

    oTransContainer.filters[0].Apply();

	var x = totNum;

	while (x > 0)

   {

  		if (x == curNum)

		{

			switch (x) 

			{

				case 1: 

  				oDIV1.style.visibility="visible";

  				break

				case 2: 

 			 	oDIV2.style.visibility="visible";

  				break

				case 3: 

  				oDIV3.style.visibility="visible";

  				break

				case 4: 

 			 	oDIV4.style.visibility="visible";

  				break

				case 5: 

  				oDIV5.style.visibility="visible";

  				break

				case 6: 

 			 	oDIV6.style.visibility="visible";

  				break

				case 7: 

  				oDIV7.style.visibility="visible";

  				break

				case 8: 

 			 	oDIV8.style.visibility="visible";

  				break

				case 9: 

  				oDIV9.style.visibility="visible";

  				break

				case 10: 

 			 	oDIV10.style.visibility="visible";

  				break

			}

		}

		else

		{

			switch (x) 

			{

				case 1: 

  				oDIV1.style.visibility="hidden";

  				break

				case 2: 

 			 	oDIV2.style.visibility="hidden";

  				break

				case 3: 

  				oDIV3.style.visibility="hidden";

  				break

				case 4: 

 			 	oDIV4.style.visibility="hidden";

  				break

				case 5: 

  				oDIV5.style.visibility="hidden";

  				break

				case 6: 

 			 	oDIV6.style.visibility="hidden";

  				break

				case 7: 

  				oDIV7.style.visibility="hidden";

  				break

				case 8: 

 			 	oDIV8.style.visibility="hidden";

  				break

				case 9: 

  				oDIV9.style.visibility="hidden";

  				break

				case 10: 

 			 	oDIV10.style.visibility="hidden";

  				break

			}

		}

		x--;

   }

	

if (curNum==totNum) 

	curNum = 1;

else

  	curNum++;



    oTransContainer.filters[0].Play();

}









function setCookie(name, value, path, domain, secure) {

    document.cookie= name + "=" + escape(value) +

            "; expires=Thu, 01-Jan-3000 00:00:01 GMT" +

        ((path) ? "; path=" + path : "") +

        ((domain) ? "; domain=" + domain : "") +

        ((secure) ? "; secure" : "");

history.go();

}







/**

 * Gets the value of the specified cookie.

 *

 * name  Name of the desired cookie.

 *

 * Returns a string containing value of specified cookie,

 *   or null if cookie does not exist.

 */

function getCookie(name) {

    var dc = document.cookie;

    var prefix = name + "=";

    var begin = dc.indexOf("; " + prefix);

    if (begin == -1) {

        begin = dc.indexOf(prefix);

        if (begin != 0) return null;

    } else {

        begin += 2;

    }

    var end = document.cookie.indexOf(";", begin);

    if (end == -1) {

        end = dc.length;

    }



    return unescape(dc.substring(begin + prefix.length, end));

}



/**

 * Deletes the specified cookie.

 *

 * name      name of the cookie

 * [path]    path of the cookie (must be same as path used to create cookie)

 * [domain]  domain of the cookie (must be same as domain used to create cookie)

 */

function deleteCookie(name, path, domain) {

    if (getCookie(name)) {

        document.cookie = name + "=" +

            ((path) ? "; path=" + path : "") +

            ((domain) ? "; domain=" + domain : "") +

            "; expires=Thu, 01-Jan-70 00:00:01 GMT";

    }

history.go();

}









