var siteUrl = "http://www.dowedo.net/compiler/";
var imageUrl = siteUrl+"images/";
var extToolWind;
var inputWin;
function getObject(obj) {
	var theObj
	if (document.layers) {if (typeof obj == "string") {return document.layers[obj]} else {return obj}}
	if (document.all) {if (typeof obj == "string") {return document.all(obj).style} else {return obj.style}}
	if (document.getElementById) {if (typeof obj == "string") {return document.getElementById(obj).style} else {return obj.style}}
	return null
}

function getElObject(obj){
    var theObj
	if (document.layers) {if (typeof obj == "string") {return document.obj} else {return obj}}
	if (document.all) {if (typeof obj == "string") {return document.all(obj)} else {return obj}}
	if (document.getElementById) {if (typeof obj == "string") {return document.getElementById(obj)} else {return obj}}
	return null
}

function turn_off(ImageName) {
	if (document.images != null) {
		   getElObject(ImageName).src = eval(ImageName + ".src");
	}
}

function turn_over(ImageName) {
	if (document.images != null) {
		  getElObject(ImageName).src = eval(ImageName + "_on.src");
	}
}

function turn_on(ImageName) {

	if (document.images != null) {
		   getElObject(ImageName).src = eval(ImageName + "_down.src");		
	}
}

function openToolWin(thsUrl){
if (extToolWind && extToolWind.open && !extToolWind.closed) extToolWind.close();
extToolWind = window.open(siteUrl+thsUrl,"extToolWind","top=10,left=10,height=450,width=550,resizable,status,scrollbars");
}


function openInputWind(thsUrl,winWidth,winHeight){
  scrLeft = typeof window.screenLeft != 'undefined' ? window.screenLeft : window.screenX;
  scrTop = typeof window.screenTop != 'undefined' ? window.screenTop - 22 : window.screenY;
		 if (inputWin && inputWin.open && !inputWin.closed) inputWin.close();

		 inputWin = window.open(thsUrl,"","top="+(scrTop+30)+",left="+(scrLeft+30)+",height="+winHeight+",width="+winWidth+",statusbar,scrollbars,resizable")
}  
