/***********************************************
* AnyLink Vertical Menu- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var sWpPath = sSitePath+"content/blog/";

//Contents for menu About us
var menuShow1=new Array()
menuShow1[0]='<a href="'+sWpPath+'?cat=3&page_id=440"><div class="box_search">Why us</div></a>'
menuShow1[1]='<a href="'+sWpPath+'?cat=4&page_id=439"><div class="box_search">What we do</div></a>'
//menuShow1[2]='<a href="'+sWpPath+'?cat=5&page_id=441"><div class="box_search">Write us</div></a>'
menuShow1[2]='<a href="'+sSitePath+'index.php?act=writeus"><div class="box_search">Write us</div></a>'
//menuShow1[3]='<a href="'+sWpPath+'?cat=6&page_id=437"><div class="box_search">FAQ</div></a>'
menuShow1[4]='<a href="'+sWpPath+'?cat=7&page_id=438"><div class="box_search">The Team</div></a>'

//Contents for menu Window into the World
var menuShow2=new Array()
menuShow2[0]='<a href="'+sWpPath+'?cat=87"><div class="box_search">Creative Business</div></a>'
menuShow2[1]='<a href="'+sWpPath+'?cat=88"><div class="box_search">Event Calendar</div></a>'
menuShow2[2]='<a href="'+sWpPath+'?cat=89"><div class="box_search">Innovative Story</div></a>'
menuShow2[3]='<a href="'+sWpPath+'?cat=90"><div class="box_search">Interview</div></a>'
menuShow2[4]='<a href="'+sWpPath+'?cat=91"><div class="box_search">News & Updates</div></a>'
//menuShow2[5]='<a href="'+sWpPath+'?cat=92"><div class="box_search">Policy Watch</div></a>'
menuShow2[6]='<a href="'+sWpPath+'?cat=93"><div class="box_search">Trend</div></a>'

//Contents for menu Creative Resources
var menuShow3=new Array()
//menuShow3[0]='<a href="'+sSitePath+'content/wiki/"><div class="box_search">DesignWiki</div></a>'
//menuShow3[1]='<a href="'+sWpPath+'?cat=79"><div class="box_search">Creative & Skill Mapping</div></a>'
menuShow3[2]='<a href="'+sWpPath+'?cat=80"><div class="box_search">Design Icon</div></a>'
menuShow3[3]='<a href="'+sWpPath+'?cat=78"><div class="box_search">Design-Biz info.</div></a>'
//menuShow3[3]='<a href="'+sWpPath+'?cat=81"><div class="box_search">Design Info.</div></a>'
menuShow3[4]='<a href="'+sSitePath+'index.php?act=directory"><div class="box_search">Directory</div></a>'
//menuShow3[5]='<a href="'+sWpPath+'?cat=83"><div class="box_search">Innovation Mapping</div></a>'
//menuShow3[6]='<a href="'+sWpPath+'?cat=84"><div class="box_search">Research Thesis</div></a>'
//menuShow3[7]='<a href="'+sWpPath+'?cat=85"><div class="box_search">Showroom</div></a>'

// Contents for menu Community Playground
var menuShow4=new Array()
menuShow4[0]='<a href="'+sWpPath+'?cat=63"><div class="box_search">Biz Matching</div></a>'
menuShow4[1]='<a href="'+sWpPath+'?cat=64"><div class="box_search">Blogs</div></a>'
menuShow4[2]='<a href="'+sWpPath+'?cat=75"><div class="box_search">Contests & Awards</div></a>'
menuShow4[3]='<a href="'+sWpPath+'?cat=76"><div class="box_search">Cool Hunting</div></a>'
menuShow4[4]='<a href="'+sWpPath+'?cat=74"><div class="box_search">TCDC Recommended</div></a>'

//-------------------------------------------------------------------------------------------

// Contents for menu Blogs
var menuShow5=new Array()
menuShow5[0]='<a href="'+sWpPath+'?cat=65"><div class="box_search">Academic</div></a>'
//menuShow5[1]='<a href="'+sWpPath+'?cat=66"><div class="box_search">Design-Biz</div></a>'
menuShow5[2]='<a href="'+sWpPath+'?cat=67"><div class="box_search">General</div></a>'
//menuShow5[3]='<a href="'+sWpPath+'?cat=68"><div class="box_search">Green</div></a>'
//menuShow5[4]='<a href="'+sWpPath+'?cat=69"><div class="box_search">Happiness of Design</div></a>'
//menuShow5[5]='<a href="'+sWpPath+'?cat=70"><div class="box_search">Name Card Festival</div></a>'
menuShow5[6]='<a href="'+sWpPath+'?cat=71"><div class="box_search">Regional</div></a>'
//menuShow5[7]='<a href="'+sWpPath+'?cat=72"><div class="box_search">Skills Base</div></a>'
//menuShow5[8]='<a href="'+sWpPath+'?cat=73"><div class="box_search">TCDC One Hundred</div></a>'

var menuShow6=new Array()
menuShow6[0]='<a href="'+sWpPath+'?cat=21"><div class="box_search">Research</div></a>'
menuShow6[1]='<a href="'+sWpPath+'?cat=22"><div class="box_search">Thesis</div></a>'
menuShow6[2]='<a href="'+sWpPath+'?cat=23"><div class="box_search">White paper</div></a>'
menuShow6[3]='<a href="'+sWpPath+'?cat=24"><div class="box_search">Know how</div></a>'
menuShow6[4]='<a href="'+sWpPath+'?cat=25"><div class="box_search">Education worldwide</div></a>'
menuShow6[5]='<a href="'+sWpPath+'?cat=26"><div class="box_search">Wiki</div></a>'

var menuShow7=new Array()
menuShow7[0]='<a href="'+sWpPath+'?cat=26"><div class="box_search">DesignWiki</div></a>'
menuShow7[1]='<a href="'+sWpPath+'?cat=21"><div class="box_search">Research</div></a>'
menuShow7[2]='<a href="'+sWpPath+'?cat=22"><div class="box_search">Thesis</div></a>'
menuShow7[3]='<a href="'+sWpPath+'?cat=23"><div class="box_search">White Paper</div></a>'


var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=2 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}

}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}