ben js den pek anlamam. ama anladığım kadarıyla şöyle bişi yazdım. ifleri çoğaltarak sorunsuz hale getirebilirsin. belki asp mantık gibi oluyodur. yani if e gerek kalmadan screen width değeri direk width="" içine yazılıp oluyodur. ama onu bilen varsa paylaşır ben bildiğimi paylaşayım. işini görür

<script language="JavaScript">
if (screen.width == 640)
{
document.write('<iframe width="640" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
else
if (screen.width == 800)
{
document.write('<iframe width="800" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
else
if (screen.width == 960)
{
document.write('<iframe width="960" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
else
if (screen.width == 1024)
{
document.write('<iframe width="1024" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
else
if (screen.width == 1152)
{
document.write('<iframe width="1152" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
else
if (screen.width == 1280)
{
document.write('<iframe width="1280" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.com.tr">')
}
</script>