/*Opening popup window, for editor*/
//open centered popup window
<!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL:  http://fineline.xs.mw -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(width,height,target,title) {
var imag=target
var nHeight = height;
var nWidth = width;
var nXpos = (screen.availWidth - nWidth) / 2;
var nYpos = (screen.availHeight - nHeight) / 2;
day = new Date();
id = day.getTime();

eval("page" + id + " = window.open('window.php?target=" + imag + "', '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + "  ,height=" + height + ",left =" + nXpos + ",top ="+nYpos+",screenY ="+nYpos+",screenX ="+nXpos+"');");

}
// End -->

// AJAX
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
//funkcija ki klice php
function ajax(url,target) {
	xmlhttp.open("GET", url,true);
	 xmlhttp.onreadystatechange=function() {
	  if (xmlhttp.readyState==4) {
	  		document.getElementById(target).innerHTML = xmlhttp.responseText
	   }
	 }
	 xmlhttp.send(null)
}

//




