// 覧覧覧覧覧覧覧覧	DATE AND TIME

function TheDate() {
	today = new Date();
	TimeHrs = today.getHours(); TimeMin = today.getMinutes();
	DateMth = today.getMonth()+1; DateDate = today.getDate();
	DateYear = today.getYear(); DateDy = today.getDay();

	if (TimeHrs > 12) {
		TimeHrs = TimeHrs - 12;
		if (TimeHrs == 12) { AmPm = "am"; } else { AmPm = "pm"; }
	} else {
		if (TimeHrs == 12) { AmPm = "pm"; } else { AmPm = "am"; }
	}

	if (TimeMin < 10) { TimeMin = "0" + TimeMin; }

	DateMonth = ["","January ","February ","March ","April ","May ","June ",
		"July ","August ","September ","October ","November ","December "];

	DateDay = ["Sunday, ","Monday, ","Tuesday, ","Wednesday, ","Thursday, ","Friday, ","Saturday, "];

	brsr=navigator.appName
	if (brsr=="Netscape") {
		if (DateYear < 99) { DateYear = DateYear + 2000; } else { DateYear = DateYear + 1900; }
	}

	// ----------DAY OF WEEK VAR:	DateDay[DateDy];

	document.write("<span class=\"smtext\">" + DateMonth[DateMth] + DateDate + ", " + DateYear + "</span>");
}


// 覧覧覧覧覧覧覧覧	JUMP MENU

function GoLocation() {
	field = document.jumper.JumpMenu; len = field.length;
	for (a=0; a<len; a++) { if (field.options[a].selected) { break; } }

	GoURL = field.options[a].value;	loc = location.href;
	if (loc.search(/http:\/\/computer/) != -1) { GoURL = "/cp" + GoURL; }
	if (a != 0) { location = GoURL; }
}


// 覧覧覧覧覧覧覧覧	ADSENSE

function GoogleAd() {
	google_ad_client = "pub-3373249915520899"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as";

	document.write("<script language=\"JavaScript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>")
}


// 覧覧覧覧覧覧覧覧	DHTML MENU

// default background color before mousing over main menu items:

MainMenuBgCol = "#00005F";

// when you first highlight the menu:
// highlight color of main menu items for mouse-over

MainMenuBgColHilite = "#6F80C0";

// when mousing over secondary menus:
// highlight color of dropdown menu items for mouse-over

Menu2ndHilite = "#CFD7EF";

// highlight color of dropdown menus for mouse-out and default color for dropdowns

Menu2ndNoHilite = "#AFB8EF";


// DO NOT EDIT ANYTHING BELOW THIS LINE
// ｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯｯ

inmenu=false; lastmenu=0;
function Menu(current,pxl,GoRight,GoDown) {
	GoRight = parseInt(GoRight); GoDown = parseInt(GoDown);
	if (navigator.appName.search(/explorer/i) != -1) { LtPos = 10 + GoRight; TpPos = 15 + GoDown;
	} else { LtPos = 8 + GoRight; TpPos = 8 + GoDown; }

	if (!document.getElementById) { return; }
	inmenu=true; oldmenu=lastmenu; lastmenu=current;
	if (oldmenu) { Erase(oldmenu); }
	m = document.getElementById("menu-" + current); box = document.getElementById(current);
	box.style.left = m.offsetLeft + LtPos; box.style.top = m.offsetTop + m.offsetHeight + TpPos;
	box.style.visibility = "visible"; m.style.backgroundColor = MainMenuBgColHilite;
	box.style.backgroundColor = Menu2ndNoHilite; box.style.width = pxl + "px";
}


function Erase(current) {
	if (!document.getElementById) { return; }
	if (inmenu && lastmenu==current) { return; }
	m = document.getElementById("menu-" + current);
	box = document.getElementById(current); box.style.visibility = "hidden"; m.style.backgroundColor = MainMenuBgCol;
}


function Timeout(current) { inmenu=false; window.setTimeout("Erase('" + current + "')",100); }


function Highlight(menu,item) {
	if (!document.getElementById) { return; }
	inmenu = true; lastmenu = menu; obj = document.getElementById(item); obj.style.backgroundColor = Menu2ndHilite;
}


function UnHighlight(menu,item) {
	if (!document.getElementById) { return; }
	Timeout(menu); obj = document.getElementById(item); obj.style.backgroundColor = Menu2ndNoHilite;
}


// 覧覧覧覧覧覧覧覧	RSS FEED / NEWSLETTER SUBSCRIPTION CODE

function RSSNews() {
	a = location.href; a = a.replace(/\//g, "%2F"); a = a.replace(/:/g, "%3A");

	if (navigator.appName.search(/explorer/i) != -1) { gglInput = 20; gglPad = "padding: 0; margin: -14px 0 -10px 0";
		document.write("<style type=\"text/css\">\n.search { padding: 0; top: 0; }\n</style>\n"); SubscrPad = "padding: 0; margin-left: -9";
	} else { gglInput = 25; gglPad = "padding: 15px 0 10px 0; margin: -12px 0 -13px 0"; SubscrPad = "padding: 14px 0 10px 0; margin-left: -9"; }

	document.write("<div class=\"menu f9\" style=\"border: 1px dotted #d5d5ee; border-width: 0 1px 1px 1px\">",
	"<form action=\"http://www.creativity-portal.com/search/\" ",
	"id=\"cse-search-box\"><div style=\"", gglPad,
	"\" class=\"ctr\"><div class=\"f8 alnlt\" style=\"padding-left: 18px; color: #3c5793\">search site</div>",
	"<input type=\"hidden\" name=\"cx\" value=\"partner-pub-3373249915520899:gq1pim36xp3\" /><input ",
	"type=\"hidden\" name=\"cof\" value=\"FORID:10\" /><input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\" /><input ",
	"type=\"text\" name=\"q\" class=\"search2\" size=\"", gglInput, "\" title=\"Enter your search terms here\" /> <input type=\"submit\" name=\"sa\" ",
	"value=\"Search\" class=\"search\" onMouseOver=\"style.cursor='pointer'; style.borderColor='#9595dd'\" ",
	"onMouseOut=\"style.borderColor='#c5c5ee'\" /></div></form>",
	"<script ","type=\"text/javascript\" src=\"http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en\"></script></div>",

	"<div class=\"menu f9\" style=\"border-top-width: 0\">",
	"<div style=\"padding: 10px 0 3px 0\">",
	"<iframe src=\"http://www.facebook.com/plugins/like.php?href=", a, "&amp;layout=standard&amp;",
	"show_faces=false&amp;width=220&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=30\" ",
	"scrolling=\"no\" frameborder=\"0\" style=\"overflow: hidden; width: 220px; ",
	"height: 30px\" allowTransparency=\"true\"></iframe></div>",

	"<div id=\"NewPlusOne\" style=\"overflow: hidden; width: 150px;\"></div>",

	"<div style=\"padding: 10px 20px 0 20px\"><div class=\"ctr\" style=\"padding: 0 25px 10px 0\"><img src=\"/images/main/newsletter/pal.gif\"\n",
	"alt=\"Inspiring Creativity Newsletter\" title=\"Inspiring Creativity Newsletter\"\n",
	"width=\"163\" height=\"126\" border=\"0\" /></div>",
	"<strong>Discover Your Muse!</strong> Subscribe to our FREE NewZine ",
	"for inspiring interviews, coaching tips, new articles, and fresh perspectives to jumpstart your creativity! ",
	"<form name=\"subscr\" method=\"post\" action=\"http://www.ymlp.com/subscribe.php?creativityportal\">\n",

	"<div class=\"ctr\" style=\"", SubscrPad, "\"><input name=\"YMLP0\" type=\"text\" ",
	"value=\"primary e-mail\" size=\"20\" onFocus=\"if(subscr.YMLP0.value=='primary e-mail'){subscr.YMLP0.value=''}\" ",
	"onBlur=\"if(subscr.YMLP0.value==''){subscr.YMLP0.value='primary e-mail'}\" ",
	"class=\"search2\" style=\"width: 190px\" title=\"Enter your e-mail address here\" /><br />\n",
	"<input name=\"submit\" type=\"submit\" value=\"Yes, Subscribe Me!\" onMouseOver=\"style.cursor='pointer'; style.borderColor='#9595dd'\" ",
	"onMouseOut=\"style.borderColor='#c5c5ee'\" class=\"search\" style=\"width: 144px; margin-top: 3px; top: 0\" />",
	"</div></form></div></div>");
}


function RSSNews2() {
	MoveIt = document.getElementById("GglPlusOne").innerHTML;
	document.getElementById("NewPlusOne").innerHTML = MoveIt;
}


// 覧覧覧覧覧覧覧覧	ADDTHIS

function AddThis() {
	document.write("<div class=\"addthis_toolbox addthis_default_style\">",
		"<a href=\"http://www.addthis.com/bookmark.php?v=250&amp;pub=cportal\" class=\"addthis_button_compact blu nn\">Share</a> ",
		"<span class=\"addthis_separator\">|</span> <a class=\"addthis_button_google_plusone\"></a> <a class=\"addthis_button_facebook\"></a> ",
		"<a class=\"addthis_button_facebook_like\"></a> <a class=\"addthis_button_tweet\"></a> ",
		"<a class=\"addthis_button_email\"></a> <a class=\"addthis_button_favorites\"></a></div>",
		"<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pub=cportal\"></script>",
		"<div class=\"divbar2\"></div>");
}


function JSNewWinLink(a) { document.write("<a href=\"", a, "\" target=\"_blank\" class=\"blu nn\">"); }


// 覧覧覧覧覧覧覧覧	INTERNAL

function ShowHLN(HN) {
	FlagHL = 0; HLN = HN; data = unescape(document.cookie); parts = data.split("; "); len = parts.length;

	for (a=0; a<len; a++) {
		if (parts[a].search(/ShowHiliteNum/) != -1) { ID = parts[a].split("="); ID = ID[1]; FlagHL = 1; }
	}

	if (FlagHL == 1) {
		date = new Date();
		cdt = 1000 * 60 * 60 * 24 * 365 * 5; currentdate = date.getTime() + cdt; date.setTime(currentdate);
		document.cookie = "ShowHiliteNum=" + ID + "; expires=" + date.toGMTString() + "; path=/";

		data = unescape(document.cookie);
		if (data.length > 0 && ID.length > 3) {
			document.write("<script type=\"text/JavaScript\"", " src=\"/z.internal.setting/show.hl.num.", ID, ".js\"></script>");
		}
	}
}


