function Changewidth (now,target)
{//now is the width that the code now adapts to, such as 800;target is the width of the display resolution you want to achieve
var widthstr;
var flag = true;
for (var i = 0;i < document.all.length;i++)
{
Flag = true;
Try
{
if (Document.All.Item (i). width! = null)
{
Widthstr = Document.All.Item (i). width.tostring ();
if (Widthstr.indexof ("%") = =-1 && widthstr! = "" && widthstr! = "0")
{
Widthstr = (parseint (widthstr) * target/now). toString ();
Document.All.Item (i). width = parseint (WIDTHSTR);
Flag = false;
}
}
}
catch (E)
{
Flag = true;
}
if (flag)
{
Try
{
if (Document.All.Item (i). style.width! = null)
{
Widthstr = Document.All.Item (i). style.width.toString ();
if (Widthstr.indexof ("%") = =-1 && widthstr! = "" && widthstr! = "0")
{
Widthstr = (parseint (widthstr) * target/now). toString ();
Document.All.Item (i). Style.width = parseint (WIDTHSTR);
}
}
}
catch (E)
{
}
}
}
}
JavaScript functions for Adaptive browser resolution [GO]