
     function new_win(adrese, w, h)
{
        width=screen.width;
        height=screen.height;
        l=(width-w)/4;
        t=(height-h)/4;

  window.open(adrese, "_blank", "toolbar=no, location=no, left="+l+", top="+t+", directories=no, status=no, menubar=no, scrollbars=no, resizable=0, fullscreen=no, width="+w+", height="+h);
}


     function tirgus(adrese, w, h)
{
        width=screen.width;
        height=screen.height;
        l=(width-w)/2;
        t=(height-h)/2-50;

  window.open(adrese, "_blank", "toolbar=no, location=no, left="+l+", top="+t+", directories=no, status=yes, menubar=no, scrollbars=yes, resizable=1, fullscreen=no, width="+w+", height="+h);
}

function screenwidth() {

	var height, width;

      if (document.all)
    height = document.body.offsetHeight,
	width =document.body.offsetWidth;
   else if (document.layers)
   height = window.innerHeight, width = window.innerWidth;

   load=document.getElementById("bodytable");
   load.style.width=width;
}


   function Insert(Text) {
element = document.getElementById("text");
element.focus();
if (document.selection) {
SelectedText = element.document.selection.createRange();
SelectedText.text = Text;
}
}




function ImageOver(url) {

document.prodphoto.src=url;

}


function quat(id) {

q = document.getElementById(id);
element = document.getElementById('text');
element.focus();
if (document.selection) {
SelectedText = element.document.selection.createRange();
/*alert(text);*/
SelectedText.text = '[QUOTED]'+q.innerHTML+'[/QUOTED]';
}

}
function insertcode(smile) {
	var code = smile;
	var myText = document.createTextNode(code);
	document.getElementById("content").appendChild(myText);
}



function quoted(id,user){
	var oldHTML = document.getElementById(id).innerHTML;
	var newHTML = oldHTML;
	document.getElementById(id).innerHTML = newHTML;

	element = document.getElementById('content');
	var myText = document.createTextNode(user+':[QUOTED]'+newHTML+'[/QUOTED]');
	document.getElementById("content").appendChild(myText);
}



 function show(key,name) {

		var menu = eval(name+key);

if (menu.style.display == "none")
	menu.style.display="inline";

 }

  function hide(key,name) {

		var menu = eval(name+key);


if (menu.style.display == "inline")
	menu.style.display="none";

 }



