function newimg(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } }
function ci() { if (document.images && (plflag == true)) {	for (var i=0; i<ci.arguments.length; i+=2) { document[ci.arguments[i]].src = ci.arguments[i+1]; } } }
function owin(u,t,f) { window.open(u,t,f); }
function am_buy(i,curr) { var g='4t', r='4templates', w=740, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=pi&cmd=sip&ruid=' + r + '&gid=' + g + '&id=' + i + '&curr=' + curr, 'ft_buy' + i, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
function am_cart(curr) { var r='4templates', w=740, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=cart&ruid=' + r + '&curr=' + curr, 'cart' + r, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
function am_cart_add(i,curr) { var g='4t', r='4templates', w=720, h=500, l=Math.max((screen.availWidth - w) / 2,0), t=Math.max((screen.availHeight / 2) - (h / 2), 0); owin('https://secure.arixmedia.com/index.php?action=cart&cmd=add&ruid=' + r + '&gid=' + g + '&id=' + i + '&curr=' + curr, 'cart' + r, 'scrollbars=yes, status=yes, resizable=yes, width=' + w + ', height=' + h + ', left=' + l +', top=' + t); }
var w_w = 550, w_h = 600, w_l = 50, w_t = 50;
var w_features = 'scrollbars=yes, status=yes, resizable=yes, width=' + w_w + ', height=' + w_h + ', left=' + w_l +', top=' + w_t;
function wthemes(i) { owin('/help/w/themes/' + '#' + i, 'Help_Themes', w_features); }
function wstyles(i) { owin('/help/w/styles/' + '#' + i, 'Help_Styles', w_features); }
function wresolutions(i) { owin('/help/w/resolutions/' + '#' + i, 'Help_Resolutions', w_features); }
function wfeatures(t,i) { owin('/help/w/features_' + t + '/#' + i, 'Help_Features', w_features); }
function whelp(s,i) { owin('/help/w/' + s + '/' + '#' + i, 'Help', w_features); }
function uconf(u) { var c = confirm('Are you sure? Click OK to proceed.'); if (c) document.location = u; }
NS4 = (document.layers) ? true : false;
function ce(f,e) { var c=0; if (NS4) c = e.which; else c = e.keyCode; if (c == 13) f.submit(); }
var plflag = false;
function primg() {
	if (document.images) {
		i0 = newimg("images/blight_off.gif");
		i1 = newimg("images/blight_on.gif");
		m0 = newimg("images/menu_0.gif");
		m1 = newimg("images/menu_1.gif");
		m2 = newimg("images/menu_2.gif");
		m3 = newimg("images/menu_3.gif");
		m4 = newimg("images/menu_4.gif");
		m5 = newimg("images/menu_5.gif");
		m6 = newimg("images/menu_6.gif");
		mh = newimg("images/menu_home.gif");
		mm1 = newimg("images/hc.jpg");
		mm2 = newimg("images/wc.jpg");
		mm3 = newimg("images/chc.jpg");
		mm4 = newimg("images/rr.jpg");
		mm5 = newimg("images/ym.jpg");
		mm6 = newimg("images/cc.jpg");
		plflag = true;
	}
}
function ims(i,n,p,e)
{
	if (n == 1)
		document.images[i].src = p + i + e;
	else
		document.images[i].src = p + i + '_' + n + e;
}



function swapimg() { if (document.images) {	for (var i=0; i<swapimg.arguments.length; i+=2) { document[swapimg.arguments[i]].src = swapimg.arguments[i+1]; } } }

function popup(mylink, windowname, w, h)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width='+w+',height='+h+',scrollbars=yes');
return false;
}

function mover(n, m) {
if(n == -1) 
ci('menu','images/menu_'+m+'.gif','blight'+m,'images/blight_on.gif');
else
ci('blight'+n, 'images/blight_off.gif','menu','images/menu_'+m+'.gif','blight'+m,'images/blight_on.gif');
}
function mout(n, m) {
if(n == -1)
ci('blight'+m, 'images/blight_off.gif','menu','images/spacer.gif');
else
ci('blight'+m, 'images/blight_off.gif','menu','images/menu_'+n+'.gif','blight'+n,'images/blight_on.gif');
}
function checkLogin(form) {
     var emailstr = form.username.value;
     var i, j;
     if (form.username.value == '') {
         alert("Please enter your Username.");
         form.username.focus();
         return (false);
     }
     if (form.password.value == '') {
         alert("Please enter your password!");
         form.password.focus();
         return (false);
     }
    return true;
 }
function searchGo(form) {
     if (form.Terms.value == '') {
         alert("Please enter what you would like to search.");
         form.Terms.focus();
         return (false);
     }
    return true;
 }
