function upbb(abc)
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[0]
}
   var total = 0;
   var orderDetails = "";
   var formElement;
  cont = currentElement.value;
   orderDetails = cont + abc;
    
   currentElement.value = orderDetails;
}

function upf(abc)
{
   var total = 0;
   var orderDetails = "";
   var formElement;

   cont=parent.getElementById("body___Frame").getElementById("xEditingArea").innerHTML;
   orderDetails = cont + abc;
    
   parent.getElementById("body___Frame").getElementById("xEditingArea").innerHTML = orderDetails;
}


var today = new Date();
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);var a, b, c, d, e, f, x, y, v, w, m, n, s, ss = true;
function blockswait() {setTimeout('blockskill()', 100);}
function pageswait() {setTimeout('pageskill()', 100);}
function newswait() {setTimeout('newskill()', 100);}
function optionswait() {setTimeout('optionskill()', 100);}
function userswait() {setTimeout('userskill()', 100);}
function colorwait() {setTimeout('colorkill()', 100);}
function sizewait() {setTimeout('sizekill()', 100);}

function blockskill() {if(a && b)blocksmenu.style.visibility = 'hidden';}
function pageskill() {if(c && d)pagesmenu.style.visibility = 'hidden';}
function newskill() {if(e && f)newsmenu.style.visibility = 'hidden';}
function optionskill() {if(x && y)optionsmenu.style.visibility = 'hidden';}
function userskill() {if(v && w)usersmenu.style.visibility = 'hidden';}
function colorkill() {if(m && n)colormenu.style.visibility = 'hidden';}
function sizekill() {if(s && ss)sizemenu.style.visibility = 'hidden';}



function popupurl()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}

cont = currentElement.value;
lurl = window.prompt("Введите url ссылки", "");
if (!lurl)
{
window.alert("данные не введены")
orderDetails = cont;
}
else {
lname = window.prompt("Введите имя ссылки", "");
if (!lname)
{
window.alert("данные не введены")
orderDetails = cont;
}
else orderDetails = cont + " [url=" + lurl +"]" + lname + "[/url] ";
}
   currentElement.value = orderDetails;
}


function popupmail()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}
cont = currentElement.value;
lurl = window.prompt("Введите адресс почты", "");
if (!lurl)
{
window.alert("данные не введены")
orderDetails = cont;
}
else {
lname = window.prompt("Введите имя ссылки", "");
if (!lname)
{
window.alert("данные не введены")
orderDetails = cont;
}
else orderDetails = cont + " [mail=" + lurl +"]" + lname + "[/mail] ";
}    
   currentElement.value = orderDetails;
}

function popupimg()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}
cont = currentElement.value;
lname = window.prompt("Введите url картинки", "");
if (!lname)
{
lname = "";
}
orderDetails = cont + " [img]" + lname + "[/img] ";

   currentElement.value = orderDetails;
}

function pophupurl()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}

cont = currentElement.value;
lurl = window.prompt("Введите url ссылки", "");
if (!lurl)
{
window.alert("данные не введены")
orderDetails = cont;
}
else {
lname = window.prompt("Введите имя ссылки", "");
if (!lname)
{
window.alert("данные не введены")
orderDetails = cont;
}
else orderDetails = cont + ' <a href="' + lurl +'">' + lname + '</a> ';
}
   currentElement.value = orderDetails;
}



function pophupmail()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}
cont = currentElement.value;
lurl = window.prompt("Введите адресс почты", "");
if (!lurl)
{
window.alert("данные не введены")
orderDetails = cont;
}
else {
lname = window.prompt("Введите имя ссылки", "");
if (!lname)
{
window.alert("данные не введены")
orderDetails = cont;
}
else orderDetails = cont + ' <a href="mailto:' + lurl +'">' + lname + '</a> ';
}    
   currentElement.value = orderDetails;
}

function pophupimg()
{
if (currentElement == document.forms[0].elements[0])
{
currentElement = document.forms[0].elements[1]
}
cont = currentElement.value;
lname = window.prompt("Введите url картинки", "");
if (!lname)
{
lname = "";
}
orderDetails = cont + ' <img src="' + lname + '" border="0"> ';

   currentElement.value = orderDetails;
}



function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
	}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {
			return getCookieVal (j);
			}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
	return null;
	}

function DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
	}
