//Contents for menu 1 : Movies, and so on
var menu1=new Array()
menu1[0]='<A HREF="/movies/" TITLE="Movie Database A - Z">All Movies A - Z</a>'
menu1[1]='<a href="/movies/index.html" TITLE="Movies by Genre">Movies by Genre</a>'
menu1[2]='<a href="/hollywood/index_movies.html" TITLE="Hollywood Movies">Hollywood Movies</a>'
menu1[3]='<a href="/bollywood/index_movies.html" TITLE="Bollywood Movies">Bollywood Movies</a>'

//Contents for menu 2 : Celebrity, and so on
var menu2=new Array()
menu2[0]='<A HREF="/celebrities/" TITLE="Celebrity Database">Celebrities</a>'
menu2[1]='<a href="/hollywood/index-celeb.html" TITLE="Hollywood Celebrities">Hollywood Celebrities</a>'
menu2[2]='<a href="/bollywood/index-celeb.html" TITLE="Bollywood Celebrities">Bollywood Celebrities</a>'
menu2[3]='<a href="/countries/" TITLE="Celebrities by Country">Celebrities by Country</a>'

//Contents for menu 3 : News, and so on
var menu3=new Array()
menu3[0]='<A HREF="/news-gossip/index.php?cntry=India" TITLE="India : Celebrity & Movie News and Gossip">India</A>'
menu3[1]='<A HREF="/news-gossip/index.php?cntry=intl" TITLE="International : Celebrity & Movie News">International</A>'

//Contents for menu 4 : Awards, and so on
var menu4=new Array()
menu4[0]='<A HREF="http://www.starjoint.com/awards/award_detail.php?id=1" TITLE="Academy Awards - Oscar">Oscar</A>'
menu4[1]='<A HREF="http://www.starjoint.com/awards/award_detail.php?id=2" TITLE="BAFTA">BAFTA</A>'
menu4[2]='<A HREF="http://www.starjoint.com/awards/award_detail.php?id=3" TITLE="IIFA">IIFA</A>'
menu4[3]='<A HREF="http://www.starjoint.com/awards/award_detail.php?id=4" TITLE="Filmfare">Filmfare</A>'








		

var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////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:'+menuwidth+';background-color:'+menubgcolor+'" 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="-500px"
if (menuwidth!=""){
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 < 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 up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
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")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"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)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


//*********************************************************************************************************************************************

//Function for Popup window
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=600,left=0,top=0');");
}


//*********************************************************************************************************************************************

//Function for NEWS Popup window
function popUpNews(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700px,height=750px,left=0,top=0');");
}

//*********************************************************************************************************************************************

function curdate() {
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<font color='000000' size=-2 face='Verdana'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"<\/b><\/font>")
}

//*********************************************************************************************************************************************

//var url = "http://www.starjoint.com/";
var url = location.href;
var title = "Starjoint.com - A complete Movie and Celebrity Database";
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title); else if (window.sidebar) window.sidebar.addPanel(title, url, "") }

//*********************************************************************************************************************************************

var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
preloadimages("http://www.starjoint.com/images_sj/bk_header.gif","http://www.starjoint.com/images_sj/topnav.gif","http://www.starjoint.com/images_sj/bk_related_link.gif","http://www.starjoint.com/images_sj/bk_general_link.gif","http://www.starjoint.com/images_sj/logo.gif","http://www.starjoint.com/images_sj/home.gif","http://www.starjoint.com/images_sj/movies.gif","http://www.starjoint.com/images_sj/celebrities.gif","http://www.starjoint.com/images_sj/news-gossip.gif","http://www.starjoint.com/images_sj/tickmark.gif","http://www.starjoint.com/images_sj/contactus1.gif","http://www.starjoint.com/images_sj/bookmark.gif","http://www.starjoint.com/images_sj/tellafriend.gif","http://www.starjoint.com/images_sj/hollywood.gif","http://www.starjoint.com/images_sj/bollywood.gif")

//*********************************************************************************************************************************************

//**********************  FormHandler()

function formHandler(form){
var URL = document.form.year.options[document.form.year.selectedIndex].value;
window.location.href = URL; }

function formHandler1(form){
var URL = document.form.categories.options[document.form.categories.selectedIndex].value;
window.location.href = URL; }



function formHandler_year(yr,award_id){
var URL = "award.php?yr="+yr+"&award_id="+award_id;
window.location.href = URL; }

function formHandler_cat(id,award_id){
var URL = "award.php?cat="+id+"&award_id="+award_id;
window.location.href = URL; }


function formHandler_gallery(yr,award_id){
var URL = "photogallery.php?yr="+yr+"&id="+award_id;
window.location.href = URL; }



//*********************************************************************************************************************************************
