/*************************************
#####################################
# Ресурс : Nukecops 
# Автор : djmaze 
# Сайт: http://www.cpgnuke.com 
#####################################
**************************************/



var imagepath = "themes/Businesss/images/"; 
var expirationck = new Date();
expirationck.setTime(expirationck.getTime() + 60000);


blockarray = new Array(); 
var blockarrayint = -1; 

function doblocks(imgpath) { 
var imgpath;
if (imgpath != null) imagepath = imgpath; 
for (var q = 0; q < blockarray.length; q++) { 
xyzswitch(blockarray[q]); 
} 
} 

function xswitch(listID) { 

if(listID.style.display=="none") { 
listID.style.display=""; 
} else { 
listID.style.display="none";

} 
} 
function icoswitch(bid) { 

icoID = document.getElementById('pic'+bid);
 icoID.style.cursor="hand";
if(icoID.src.indexOf("minus") != -1) 
{ 
icoID.src = imagepath+"plus.gif"; 
SetCookie('block'+bid+'','yes',expirationck); 
} else {
icoID.src = imagepath+"minus.gif";
DeleteCookie('block'+bid); 
} 
} 
function xyzswitch(bid) { 

xswitch(document.getElementById('ph'+bid+'')); 
xswitch(document.getElementById('pe'+bid+'')); 
icoswitch(bid); 

}

function GetCookie(name)
{
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1)
{
begin = dc.indexOf(prefix);
if (begin != 0) return null;
}
else
{
begin += 2;
}

var end = document.cookie.indexOf(";", begin);

if (end == -1)
{
end = dc.length;
}
return unescape(dc.substring(begin + prefix.length, end));
}

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" : "");
}

