

var shown = -1;






function colorPickerPop() {
		$('body').append('<a href="" id="hider"></a><iframe id="cpframe" src="ColorPicker.html" width="555" height="420" frameborder="0"></iframe><a href="" id="closer" class="closeCP">CLOSE X</a>');
		$('#hider, #closer').click(removeLB);
		$('#hider').height($('body').height());
		var hoff, woff, unfixpos = false;
		if($(window).height() > 725) {
			hoff = 134;	
		} else if($(window).height() > 450) {
			hoff = ($(window).height() - 451)/2;	
		} else {
			hoff = self.pageYOffset || $.boxModel && document.documentElement.scrollTop || document.body.scrollTop;
			unfixpos = true;
		}
		if($(window).width() > 854) {
			woff = 70;	
		} else if($(window).width() > 714) {
			woff = ($(window).width() - 714)/2;	
		} else {
			woff = self.pageXOffset || $.boxModel && document.documentElement.scrollLeft || document.body.scrollLeft;
			unfixpos = true;
		}
		$('#cpframe').css({ top:(hoff+"px"), left:(woff+"px"), position:unfixpos ? 'absolute' : 'fixed' });
		$('#closer.closeCP').css({ top:((hoff+2)+"px"), left:((woff+450)+"px"), position:unfixpos ? 'absolute' : 'fixed' });
		$(window).resize(function() { $('#hider').height($('body').height()); });
		
		return false;
}
function colorPickerPop2(theurl,thewidth,theheight) {
		$('body').append('<a href="" id="hider"></a><iframe id="cpframe" src="' + theurl + '" width="' + thewidth + '" height="' + theheight + '" frameborder="0"></iframe><a href="" id="closer" class="closeCP">CLOSE X</a>');
		$('#hider, #closer').click(removeLB);
		$('#hider').height($('body').height());
		var hoff, woff, unfixpos = false;
		if($(window).height() > 925) {
			hoff = 134;	
		} else if($(window).height() > 750) {
			hoff = ($(window).height() - 751)/2;
			
		} else {
			hoff = self.pageYOffset || $.boxModel && document.documentElement.scrollTop || document.body.scrollTop;
			unfixpos = true;
		}
		if($(window).width() > 854) {
			woff = ($(window).width() - thewidth)/2;	
		} else if($(window).width() > 714) {
			woff = ($(window).width() - thewidth)/2;	
		} else {
			woff = self.pageXOffset || $.boxModel && document.documentElement.scrollLeft || document.body.scrollLeft;
			unfixpos = true;
	}
		$('#cpframe').css({ top:((hoff+12)+"px"), left:(woff+"px"), position:unfixpos ? 'absolute' : 'fixed' });
		$('#closer.closeCP').css({ top:(hoff+"px"), left:(woff+"px"), position:unfixpos ? 'absolute' : 'fixed' });
		$(window).resize(function() { $('#hider').height($('body').height()); });
		
		return false;
}
function removeLB() {
	$('#hider, #signupframe, #closer, #cpframe').remove();
	return false;
}



