﻿var req, image, warning, imagepath;function chk_image(_imagepath){	imagepath = _imagepath + "?num=" + Math.floor(Math.random()*1000000000000);	req = getreq();	req.onreadystatechange = imagexists;	//alert("Check img: " + imagepath);		  	//req.open("GET", imagepath + "?num=" + Math.floor(Math.random()*1000000000000), true);	req.open("GET", imagepath, true);	req.send(null);	//req.send();	//alert(req.statusText);} function imagexists(){	//alert("State: " + req.readyState)	if(req.readyState == 4)	{		//alert("Status: " + req.status);		if(req.status == 200)		{			//alert("Calling: " + imagepath);			GB_showImage("","../"+imagepath);		}	}} function getreq(){	if(window.XMLHttpRequest)		return new XMLHttpRequest();	else if(window.ActiveXObject)		return new ActiveXObject("Microsoft.XMLHTTP");}