This is my php page it's have javascript problem so plz tell me what should i do.
<?php
session_start();
if($permission=="yes"){?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css">
<!--
.heading1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: 5A800C;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body text="BLACK" onLoad="MM_preloadImages('images/update_b1_over.gif','images/traffic_b1_over.gif','images/traffic_b2_over.gif','images/traffic_b3_over.gif','images/traffic_b4_over.gif','images/traffic_b5_over.gif')">
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="5482B0">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><img src="images/logo.gif" width="100" height="88">
</div></td>
<td width="78%"><div align="left"><img src="images/Welcome_to.gif"></div></td>
</tr>
<tr>
<td><div align="center"></div>
<div align="center">
<p><img src="images/traffic_top2.gif" width="133" height="50"><br>
<a href="history.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','images/traffic_b1_over.gif',1)"><img src="images/traffic_b1.gif" name="Image11" width="133" height="30" border="0"></a><br>
<a href="dotzoo.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/traffic_b2_over.gif',1)"><img src="images/traffic_b2.gif" name="Image6" width="133" height="30" border="0"></a><br>
<a href="gallery.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','images/traffic_b3_over.gif',1)"><img src="images/traffic_b3.gif" name="Image7" width="133" height="30" border="0"></a><br>
<a href="signup.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','images/traffic_b4_over.gif',1)"><img src="images/traffic_b4.gif" name="Image8" width="133" height="30" border="0"></a><br>
<a href="help.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','images/traffic_b5_over.gif',1)"><img src="images/traffic_b5.gif" name="Image9" width="133" height="30" border="0"></a><br>
<img src="images/traffic_bottom.gif" width="133" height="110"><br><br>
<br>
</p>
</div></td>
<td align="left" valign="top"> <div align="right">
<p></p>
</div>
<blockquote>
<div align="left">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="text"><div align="justify">
<script src="try/xaramenu.js"></script><script webstyle3 src="try/tranzport.js"></script>
</div></td>
</tr>
</table>
</div>
</blockquote>
</td>
</tr>
<tr>
<td height="8" colspan="2" class="heading1"><div align="center"> <img src="images/bar.gif" width="92%" height="1">
</div></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"><span class="heading1">This site is developed and maintained
by</span><br><img src="images/dotzoo.gif" width="128" height="56"></div>
</body></html>
<?php } else
echo "<HTML> <HEAD> <META http-equiv=\"refresh\" content=\"0; url=home.htm\"></HEAD></HTML> ";
?>