function popUp(URL) {
day = new Date();
id = day.getTime();
window.open(URL,"foto", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=850,height=750');
}

function opacity(id, opacStart, opacEnd, millisec) {
   
    var speed = Math.round(millisec / 100);
        var timer = 0;
	
	   
	    if (opacStart > opacEnd) {
	            for(i = opacStart; i >= opacEnd; i--) {
		                setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
				            timer++;
					            }
						        }
							
							    else if (opacStart < opacEnd) {
							            for(i = opacStart; i <= opacEnd; i++) {
								                setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
										            timer++;
											            }
												        }
													}
													
													function changeOpac(opacity, id) {
													    var object = document.getElementById(id).style;
													    
													        object.opacity = (opacity / 100);
														object.MozOpacity = (opacity / 100);
														object.KhtmlOpacity = (opacity / 100);
															
												
														object.filter = "alpha(opacity=" + opacity + ")";
															    //object.filters = 'progid:DXImageTransform.Microsoft.Alpha(opacity='+opacity+');';
															    //alert(object.filter);
															    }

var xmlhttp = false ;

if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
{
  try {
    xmlhttp = new XMLHttpRequest ();
      }
        catch (e) {
	  xmlhttp = false}
	  }
	  
	  
	  function myXMLHttpRequest (){
	    var xmlhttplocal;
	      try {
	    	xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
		  catch (e) {
		    try {
			xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
			    catch (E) {
				  xmlhttplocal = false;
				    }
				      }
				      
				        if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
					    try {
						  var xmlhttplocal = new XMLHttpRequest ();
						    }
							catch (e) {
							      var xmlhttplocal = false;
							        }
								  }
								    return (xmlhttplocal);
								    }
								    
								    var mnmxmlhttp = Array ();
								    var mnmString = Array ();
								    var mnmPrevColor = Array ();
								    var responsestring = Array ();
								    var myxmlhttp = Array ();
								    var responseString = new String;
								    
								    var i=0;
								    var ii = 0;
								    
								    function ajax_update(myUrl, myDiv, rate){
								    
									//target2 = document.getElementById ('content');
									
									opacity(myDiv, 100, 0, 1);    										
									    ii = i++;
									    
										var content = "i=" + ii ;
										
										    mnmxmlhttp = new myXMLHttpRequest ();
											if (mnmxmlhttp) {
												    mnmxmlhttp.open ("POST", myUrl, true);
														mnmxmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded; charset=iso8859-2");
																       
																    	    mnmxmlhttp.send (content);
																			errormatch = new RegExp ("^ERROR:");
																			
																				    target2 = document.getElementById (myDiv);
								
																				    
																						mnmxmlhttp.onreadystatechange = function () {
																						
																								if (mnmxmlhttp.readyState == 4) {
																										    mnmString = mnmxmlhttp.responseText;
																										    
																										    
																													if (mnmString.match (errormatch)) {
																																mnmString = mnmString.substring (6, mnmString.length);
																																
																																			target = document.getElementById (myDiv);
																																						target2.innerHTML = mnmString;
																																						
																																								    } else {
																																								
																																								    
																																											    target = document.getElementById (myDiv);
																																											    
																																											    
																																														    target2.innerHTML = mnmString;
																																														    
																																														    opacity(myDiv, 0, 100, 500);    
																																														    
																																																	}
																																																			}
																																																				    }
																																																					    }
																																																					
																																																						timer1=setTimeout('ajax_update(\'' + myUrl + '\',\'' + myDiv + '\',\'' + rate + '\');', rate);
																																																						}																																																						 
function makeRequest(url) {
      http_request = false;
            if (window.XMLHttpRequest) { // Mozilla, Safari,...
	             http_request = new XMLHttpRequest();
		              if (http_request.overrideMimeType) {
			                // set type accordingly to anticipated content type
					            //http_request.overrideMimeType('text/xml');
						                http_request.overrideMimeType('text/html');
								         }
									       } else if (window.ActiveXObject) { // IE
									                try {
											            http_request = new ActiveXObject("Msxml2.XMLHTTP");
												             } catch (e) {
													                 try {
															                http_request = new ActiveXObject("Microsoft.XMLHTTP");
																	            } catch (e) {}
																		             }
																			           }
																				         if (!http_request) {
																					          alert('Cannot create XMLHTTP instance');
																						           return false;
																							         }
																								       //http_request.onreadystatechange = alertContents;
																								             http_request.open('GET', url, true);
																									           http_request.send(null);
															    																										      }																																																				