1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
var xxx78 = rM7.rPU[rm_OldID]; if (xxx78 != undefined) { switch(xxx78) { case "Go Away From Here": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=1\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "Blah Blah 23": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=3\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10001-Blah Bark": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=2\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10002-Gloow Too": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=5\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10004-Bring Back": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=9\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10007-Flume": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=4\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10003-Fortnight": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=7\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10009-Conges": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=6\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; case "FlimFlam-Coord:10011-Congei": document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=8\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>"); break; } }
function GetIFrameParam(value) { switch(value) { case "Go Away From Here": return 1; case "Blah Blah 23": return 3; case "FlimFlam-Coord:10001-Blah Bark": return 2; case "FlimFlam-Coord:10002-Gloow Too": return 5; case "FlimFlam-Coord:10004-Bring Back": return 9; case "FlimFlam-Coord:10007-Flume": return 4; case "FlimFlam-Coord:10003-Fortnight": return 7; case "FlimFlam-Coord:10009-Conges": return 6; case "FlimFlam-Coord:10011-Congei": return 8; default: return -1; } } /* And the original code would the be */ var iframeParam = GetIFrameParam(rM7.rPU[rm_OldID]); if(iframeParam != -1) document.write("<IFRAME SRC=\"http://www.domain.com/bin/gr.cgi?pit=3&lit=197fH5C3&goid=" + iframeParam + "\" FRAMEBORDER=\"0\" SCROLLING=\"NO\" WIDTH=\"0\" HEIGHT=\"0\"></IFRAME>");