function myfun()
{
var pvar = new Array(8);
var vvar = new Array(8);
var temp = new Array(8);
var NumberOfEnablePort=0,Flag=0;
pvar[0] = document.getElementById("Port1Enable").checked;
pvar[1] = document.getElementById("Port2Enable").checked;
pvar[2] = document.getElementById("Port3Enable").checked;
pvar[3] = document.getElementById("Port4Enable").checked;
pvar[4] = document.getElementById("Port5Enable").checked;
pvar[5] = document.getElementById("Port6Enable").checked;
pvar[6] = document.getElementById("Port7Enable").checked;
pvar[7] = document.getElementById("Port8Enable").checked;
vvar[0] = document.getElementById("SWportLink0").value;
vvar[1] = document.getElementById("SWportLink1").value;
vvar[2] = document.getElementById("SWportLink2").value;
vvar[3] = document.getElementById("SWportLink3").value;
vvar[4] = document.getElementById("SWportLink4").value;
vvar[5] = document.getElementById("SWportLink5").value;
vvar[6] = document.getElementById("SWportLink6").value;
vvar[7] = document.getElementById("SWportLink7").value;
/*
document.write(pvar[0]);document.write("<br>");
document.write(pvar[1]);document.write("<br>");
document.write(pvar[2]);document.write("<br>");
document.write(pvar[3]);document.write("<br>");
document.write(pvar[4]);document.write("<br>");
document.write(pvar[5]);document.write("<br>");
document.write(pvar[6]);document.write("<br>");
document.write(pvar[7]);document.write("<br>");
document.write(pvar.length);document.write("<br>");
document.write(vvar[0].charAt(12));document.write("<br>");
document.write(vvar[1].charAt(12));document.write("<br>");
document.write(vvar[2].charAt(12));document.write("<br>");
document.write(vvar[3].charAt(12));document.write("<br>");
document.write(vvar[4].charAt(12));document.write("<br>");
document.write(vvar[5].charAt(12));document.write("<br>");
document.write(vvar[6].charAt(12));document.write("<br>");
document.write(vvar[7].charAt(12));document.write("<br>");
document.write(vvar.length);document.write("<br>");
*/
for(var i=0;i<8;i++)
{
if(pvar[i]== true)
{
temp[NumberOfEnablePort++] = vvar[i].charAt(12);
if(NumberOfEnablePort>6)
{
Flag = 1;
break;
}
}
}
/*
for(var j=0;j<NumberOfEnablePort;j++)
{
document.write(temp[j]);document.write("<br>");
}
*/
for(var i=0;i<NumberOfEnablePort-1;i++)
{
for(var j=i+1;j<NumberOfEnablePort;j++)
{
if(temp[i] == temp[j])
{
Flag = 1;
break;
}
}
}
if(Flag == 1)
{
window.location='801f.html';
document.SWdevicecfg.action='801f.html';
}
else if(Flag == 0)
{
window.location='vvlanset.html';
document.SWdevicecfg.action='vvlanset.html';
}
}