var contactShow_jquery = false;
var contactShow_domwindow = false;
function contactShow (url, wwidth, wheight, bgcolor) {
	if (typeof wwidth == 'undefined') {
		wwidth = 600;
	}
	if (typeof wheight == 'undefined') {
		wheight = 400;
	}
	if (typeof bgcolor == 'undefined') {
		bgcolor = '#ffffff';
	}
	if (typeof jQuery == 'undefined') {
		// jQuery is not loaded
		if (!contactShow_jquery) {
			var e = document.createElement("script");
			e.src = 'http://js.xombo.com/jquery.js';
			e.type="text/javascript";
			document.getElementsByTagName("head")[0].appendChild(e);
			contactShow_jquery = true;
		}
	} else if (typeof jQuery.openDOMWindow == 'undefined') {
		// openDOMWindow is not loaded
		if (!contactShow_domwindow) {
			var e = document.createElement("script");
			e.src = 'http://js.xombo.com/jquery.DOMWindow.js';
			e.type="text/javascript";
			document.getElementsByTagName("head")[0].appendChild(e); 
			contactShow_domwindow = true;
		}
	} else {
		$.openDOMWindow({
			anchoredClassName:'contactShow',
			height:wheight,
			width:wwidth, 
			loaderHeight:16, 
			loaderWidth:17, 
			windowSource:'iframe', 
			windowHTTPType:'get',
			windowSourceURL: url,
			windowBGColor: bgcolor
		});
		return;
	}
	// repeat in a second
	setTimeout (function () { contactShow (url, wwidth, wheight, bgcolor); }, 250);
}

